[FFmpeg-cvslog] avformat/rtmpproto: fix memleak when open rtmp failed

Steven Liu git at videolan.org
Mon Oct 28 08:28:39 EET 2019


ffmpeg | branch: master | Steven Liu <lq at chinaffmpeg.org> | Thu Oct 10 10:07:53 2019 +0800| [991cf95fdeebc3aff34c3dd094df0589f7a02f68] | committer: Steven Liu

avformat/rtmpproto: fix memleak when open rtmp failed

Signed-off-by: Steven Liu <lq at chinaffmpeg.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=991cf95fdeebc3aff34c3dd094df0589f7a02f68
---

 libavformat/rtmpproto.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index eb08d4d424..42c6b94ea0 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -2880,6 +2880,9 @@ reconnect:
     return 0;
 
 fail:
+    av_freep(&rt->playpath);
+    av_freep(&rt->tcurl);
+    av_freep(&rt->flashver);
     av_dict_free(opts);
     rtmp_close(s);
     return ret;



More information about the ffmpeg-cvslog mailing list