[FFmpeg-cvslog] lavf/tcp.c: Free allocated client URLContext in case of error.
Stephan Holljes
git at videolan.org
Thu Apr 19 04:17:35 EEST 2018
ffmpeg | branch: master | Stephan Holljes <klaxa1337 at googlemail.com> | Fri Jan 12 19:16:30 2018 +0100| [37175122824d2706e8d2f67fc067b189ac400cd2] | committer: Michael Niedermayer
lavf/tcp.c: Free allocated client URLContext in case of error.
Signed-off-by: Stephan Holljes <klaxa1337 at googlemail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=37175122824d2706e8d2f67fc067b189ac400cd2
---
libavformat/tcp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index 8773493df1..b0289f854f 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list