Skip to content

Commit

Permalink
avformat/rtmpproto: fix memleak when open rtmp failed
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Liu <[email protected]>
  • Loading branch information
T-bagwell committed Oct 28, 2019
1 parent 59697e4 commit 991cf95
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libavformat/rtmpproto.c
Original file line number Diff line number Diff line change
Expand Up @@ -2880,6 +2880,9 @@ static int rtmp_open(URLContext *s, const char *uri, int flags, AVDictionary **o
return 0;

fail:
av_freep(&rt->playpath);
av_freep(&rt->tcurl);
av_freep(&rt->flashver);
av_dict_free(opts);
rtmp_close(s);
return ret;
Expand Down

0 comments on commit 991cf95

Please sign in to comment.