[FFmpeg-cvslog] lavf/http.c: Free allocated client URLContext in case of error.

Stephan Holljes git at videolan.org
Tue Jul 10 12:04:52 EEST 2018


ffmpeg | branch: release/2.8 | Stephan Holljes <klaxa1337 at googlemail.com> | Fri Jan 12 19:16:29 2018 +0100| [18772823239094cb23df43ceb01152a9bcf80710] | committer: Michael Niedermayer

lavf/http.c: Free allocated client URLContext in case of error.

Signed-off-by: Stephan Holljes <klaxa1337 at googlemail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 7b6b8c92652d6683d97515352e4a9a4147b7da7c)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=18772823239094cb23df43ceb01152a9bcf80710
---

 libavformat/http.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/http.c b/libavformat/http.c
index 7686c92742..a64ad693e1 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -513,7 +513,11 @@ static int http_accept(URLContext *s, URLContext **c)
         goto fail;
     cc->hd = cl;
     cc->is_multi_client = 1;
+    return 0;
 fail:
+    if (c) {
+        ffurl_closep(c);
+    }
     return ret;
 }
 



More information about the ffmpeg-cvslog mailing list