From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id CD1924954F for ; Sat, 13 Apr 2024 04:20:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 706FB68D2EB; Sat, 13 Apr 2024 07:20:25 +0300 (EEST) Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.2]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6061B68D07E for ; Sat, 13 Apr 2024 07:20:18 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=k6sXG i9oZRfBCPBDm9HW5B0w3HqfmuBmuHGgZC1wBFo=; b=D6b9UHHS2yzU7mzzblVzy +3HmjjZu/YegDnZ7KlRKfAzu0ZVXHfZueH8kLcR+HXFR9BR6B1YDghTuZ8VjQRz+ Ho1qJwbKr/9dVSwG7hlfM6HY+LZJHSrCslIcY+jIdrxAyX+7jMlM2QjhP9AgXKCu R1Fh3kUmaQNkU+MOr9qkaU= Received: from localhost.localdomain (unknown [111.198.54.11]) by gzga-smtp-mta-g2-4 (Coremail) with SMTP id _____wDXv2v9Bxpmg2UcAA--.1929S2; Sat, 13 Apr 2024 12:20:14 +0800 (CST) From: LuMingYin To: ffmpeg-devel@ffmpeg.org Date: Sat, 13 Apr 2024 12:20:11 +0800 Message-Id: <20240413042011.1974778-1-lumingyindetect@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: _____wDXv2v9Bxpmg2UcAA--.1929S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Jw17Zw4UWF45WFW7Ar1UJrb_yoW3WrX_KF 9FgF4UXrWYvFsxua45Cr45KFWUAa1xur93GF43Jry7Wa45ZF43ur1kWan3JrZ5JrsIyrnI krZ3KF13Wr129jkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xR_5rcPUUUUU== X-Originating-IP: [111.198.54.11] X-CM-SenderInfo: poxpx0hj1l0vphwhu3i6rwjhhfrp/1tbiKR+-92VOCdQv2AAAs- Subject: [FFmpeg-devel] [PATCH] libavformat/rtsp: fix a memory leak in libavformat/rtsp.c X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: lumingyindetect@163.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: The pointer variable 'fds' allocates a block of dynamic memory in the function 'ffurl_get_multi_file_handle', and the dynamic memory pointed to by this pointer is not released on error paths. Signed-off-by: LuMingYin --- libavformat/rtsp.c | 1 + 1 file changed, 1 insertion(+) 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++) { -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".