diff mbox

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

Message ID 20170410161046.3424-1-klaxa1337@googlemail.com
State Superseded
Headers show

Commit Message

Stephan Holljes April 10, 2017, 4:10 p.m. UTC
---
 libavformat/http.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/libavformat/http.c b/libavformat/http.c
index 293a8a7..f92549c 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -536,6 +536,9 @@  static int http_accept(URLContext *s, URLContext **c)
     cc->hd = cl;
     cc->is_multi_client = 1;
 fail:
+    if (c) {
+        ffurl_close(*c);
+    }
     return ret;
 }