diff --git a/libavformat/http.c b/libavformat/http.c index 5bb8d586de..b2cba61797 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -526,7 +526,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; }