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 DA3E249E3C for ; Sat, 13 Apr 2024 06:35:49 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7E13868D28A; Sat, 13 Apr 2024 09:35:46 +0300 (EEST) Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.3]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7E7FB68C6BD for ; Sat, 13 Apr 2024 09:35:39 +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=88jkX wyw8UoHG9jiTA7EQ6lxz46oCtdfWoQojsmWyiQ=; b=JhkKhw2NQ1goZO1/q+0x/ WZX1piHxWleK1xj7nLDBtm5VIavMboUuhd6yYRSimjxELpfnuHfkcACzW7dVp0OY svhqJdOTDYUNexwu52Wf01oACWUBoF/jk3wXxy6qeFIIY/2CjA19hXJvM6ScJ1hw R7BcGvp9nU+2h5XUtlLPoI= Received: from localhost.localdomain (unknown [111.198.54.11]) by gzga-smtp-mta-g2-2 (Coremail) with SMTP id _____wDnj5+0JxpmhEr9Aw--.47563S2; Sat, 13 Apr 2024 14:35:33 +0800 (CST) From: LuMingYin To: ffmpeg-devel@ffmpeg.org Date: Sat, 13 Apr 2024 14:35:29 +0800 Message-Id: <20240413063529.2270832-1-lumingyindetect@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: _____wDnj5+0JxpmhEr9Aw--.47563S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrKw1fKFyrtFy7AF4fWFW5GFg_yoW3GFgEya 9rJ34kZa4qgrnxJayYkFZ8JrZrGw1kCFWfJ3WfGrs5Xa4rurs0vrs7WryDJw1rXw4rArya kryaqF9FqwnF9jkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xR_5rcPUUUUU== X-Originating-IP: [111.198.54.11] X-CM-SenderInfo: poxpx0hj1l0vphwhu3i6rwjhhfrp/1tbiKR+-92VOCdQv2QACs8 Subject: [FFmpeg-devel] [PATCH] libavformat/hlsenc: fix a memory leak in libavformat/hlsenc.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: In the function 'hls_write_trailer' in the file '/FFmpeg/libavformat/hlsenc.c', the variable named 'options' allocates a block of dynamic memory in the 'av_dict_set' function, which is not freed on error paths. Signed-off-by: LuMingYin --- libavformat/hlsenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index bde7230036..0e2843c6bc 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2757,6 +2757,7 @@ static int hls_write_trailer(struct AVFormatContext *s) filename = av_asprintf("%s", oc->url); } if (!filename) { + av_dict_free(&options); av_freep(&old_filename); return AVERROR(ENOMEM); } -- 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".