lavf/tcp.c: Free allocated client URLContext in case of error.
authorStephan Holljes <klaxa1337@googlemail.com>
Fri, 12 Jan 2018 18:16:30 +0000 (19:16 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 19 Apr 2018 01:15:32 +0000 (03:15 +0200)
Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/tcp.c

index 8773493..b0289f8 100644 (file)
@@ -208,8 +208,10 @@ static int tcp_accept(URLContext *s, URLContext **c)
         return ret;
     cc = (*c)->priv_data;
     ret = ff_accept(sc->fd, sc->listen_timeout, s);
-    if (ret < 0)
+    if (ret < 0) {
+        ffurl_closep(c);
         return ret;
+    }
     cc->fd = ret;
     return 0;
 }