diff options
author | Andriy Gelman <andriy.gelman@gmail.com> | 2020-10-12 16:36:05 -0400 |
---|---|---|
committer | Andriy Gelman <andriy.gelman@gmail.com> | 2020-11-21 10:13:16 -0500 |
commit | 38bc4ba142b2304b2a0e2d86f271a28d51250fb9 (patch) | |
tree | a11625f4e041772332f83fbf7bd5e0556bafa20b /libavformat | |
parent | 423d06e0e22d3c1c62124420532206542488b10f (diff) | |
download | ffmpeg-38bc4ba142b2304b2a0e2d86f271a28d51250fb9.tar.gz |
avformat/rtspdec: fix mem leaks in listen mode if init fails
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtspdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index e0e8fc2e49..dfc84e71ba 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -694,12 +694,13 @@ static int rtsp_listen(AVFormatContext *s) } else if (methodcode == SETUP) ret = rtsp_read_setup(s, host, uri); if (ret) { - ffurl_close(rt->rtsp_hd); ret = AVERROR_INVALIDDATA; goto fail; } } fail: + ff_rtsp_close_streams(s); + ff_rtsp_close_connections(s); ff_network_close(); return ret; } |