avformat/rtmpproto: fix memleak when open rtmp failed
ffmpeg | branch: master | Steven Liu <lq@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@chinaffmpeg.org>
http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=991cf95fdeebc3aff3...
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;
participants (1)
-
Steven Liu