lavf/http.c: Free allocated client URLContext in case of error.
authorStephan Holljes <klaxa1337@googlemail.com>
Fri, 12 Jan 2018 18:16:29 +0000 (19:16 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 22 Oct 2018 23:44:40 +0000 (01:44 +0200)
Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7b6b8c92652d6683d97515352e4a9a4147b7da7c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/http.c

index 5bb8d58..b2cba61 100644 (file)
@@ -526,7 +526,11 @@ static int http_accept(URLContext *s, URLContext **c)
         goto fail;
     cc->hd = cl;
     cc->is_multi_client = 1;
         goto fail;
     cc->hd = cl;
     cc->is_multi_client = 1;
+    return 0;
 fail:
 fail:
+    if (c) {
+        ffurl_closep(c);
+    }
     return ret;
 }
 
     return ret;
 }