[FFmpeg-devel,1/2] lavf/http.c: Free allocated client URLContext in case of error.

Submitted by Stephan Holljes on Jan. 12, 2018, 6:16 p.m.

Details

Message ID 20180112181630.22533-1-klaxa1337@googlemail.com
State New
Headers show

Commit Message

Stephan Holljes Jan. 12, 2018, 6:16 p.m.
Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
---
 libavformat/http.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/libavformat/http.c b/libavformat/http.c
index 4806b1e59b..537d0a4773 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -574,7 +574,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;
 }