diff options
author | LuMingYin <lumingyindetect@163.com> | 2024-04-13 12:20:11 +0800 |
---|---|---|
committer | Zhao Zhili <zhilizhao@tencent.com> | 2024-05-20 23:57:05 +0800 |
commit | 14f9e47314ab70a2c786cb040ca0ca2fc1a0e163 (patch) | |
tree | 8783d09030e61d8a8c121fdc9f940da701ce8aec | |
parent | 9481b7d932e895b903c260c54c7b26adfe402e1f (diff) | |
download | ffmpeg-14f9e47314ab70a2c786cb040ca0ca2fc1a0e163.tar.gz |
libavformat/rtsp: fix a memory leak on error path
Signed-off-by: LuMingYin <lumingyindetect@163.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
-rw-r--r-- | libavformat/rtsp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index b0c61ee00a..db78735c7a 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -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++) { |