mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-30 11:22:14 +00:00
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>
This commit is contained in:
parent
423d06e0e2
commit
38bc4ba142
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user