[FFmpeg-cvslog] avformat/librtmp: Fix memory leak if RTMP_ConnectStream() fails
Andrey Myznikov
git at videolan.org
Tue Jan 14 01:59:36 CET 2014
ffmpeg | branch: master | Andrey Myznikov <andrey.myznikov at gmail.com> | Tue Jan 14 01:42:42 2014 +0100| [b79bccba80129154121307a7754f69911bca2163] | committer: Michael Niedermayer
avformat/librtmp: Fix memory leak if RTMP_ConnectStream() fails
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b79bccba80129154121307a7754f69911bca2163
---
libavformat/librtmp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/librtmp.c b/libavformat/librtmp.c
index 5b4c39d..f0b5929 100644
--- a/libavformat/librtmp.c
+++ b/libavformat/librtmp.c
@@ -134,6 +134,9 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
fail:
if (filename != s->filename)
av_freep(&filename);
+ if (rc)
+ RTMP_Close(r);
+
return rc;
}
More information about the ffmpeg-cvslog
mailing list