mirror of https://git.ffmpeg.org/ffmpeg.git
libavformat/rtsp: fix a memory leak on error path
Signed-off-by: LuMingYin <lumingyindetect@163.com> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
parent
9481b7d932
commit
14f9e47314
|
@ -2071,6 +2071,7 @@ static int udp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
|
|||
if (fdsnum != 2) {
|
||||
av_log(s, AV_LOG_ERROR,
|
||||
"Number of fds %d not supported\n", fdsnum);
|
||||
av_freep(&fds);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
for (fdsidx = 0; fdsidx < fdsnum; fdsidx++) {
|
||||
|
|
Loading…
Reference in New Issue