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 CC07F49475 for ; Fri, 12 Apr 2024 09:19:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 115EF68D210; Fri, 12 Apr 2024 12:19:39 +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 D8AF068C10E for ; Fri, 12 Apr 2024 12:19:31 +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=xJCdn GVzdni8ij2zhIp6UXJLK9+eAqgaHXje3JOAPAo=; b=C6VGgFER1D6Trf5J2LtUi JFXMycBbEEQa+4m38emEX+b/JD/d4MnAjmnTazKZXrhxF/ZWIxpp4evAZzeMPhxi Bo1ZKeNPVmDA/VHiHzMPjZhU7ODcxiBkPoNwYUdSzcNg2BOo+5qenmxvOmTgZzv6 GMWy45oMxtavkEk9GPBJUQ= Received: from localhost.localdomain (unknown [111.198.54.11]) by gzga-smtp-mta-g2-3 (Coremail) with SMTP id _____wD335+e_BhmiVyjAw--.56407S2; Fri, 12 Apr 2024 17:19:26 +0800 (CST) From: LuMingYin To: ffmpeg-devel@ffmpeg.org Date: Fri, 12 Apr 2024 17:19:23 +0800 Message-Id: <20240412091923.1046792-1-lumingyindetect@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: _____wD335+e_BhmiVyjAw--.56407S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrur18Wry7KF1rCFWxKw45Wrg_yoW3Xwb_uF 92gwsrJF48C392ywn2yrZ8Xr4fZrnYyFZ3uryq9F13tw1UX3Z0gFnFqrZ3JrykGry7Krn3 CryDtw1rA3y09jkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRL2-ePUUUUU== X-Originating-IP: [111.198.54.11] X-CM-SenderInfo: poxpx0hj1l0vphwhu3i6rwjhhfrp/1tbiTwC+92XAlX+GKwAAsk Subject: [FFmpeg-devel] [PATCH v1] libavfilter/af_channelsplit.c:fix memory leak 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: Signed-off-by: LuMingYin --- libavfilter/af_channelsplit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c index d18d91dcb6..2cfac19cd3 100644 --- a/libavfilter/af_channelsplit.c +++ b/libavfilter/af_channelsplit.c @@ -163,8 +163,10 @@ static int filter_frame(AVFilterLink *outlink, AVFrame *buf) buf_out->data[0] = buf_out->extended_data[0] = buf_out->extended_data[s->map[i]]; ret = av_channel_layout_from_mask(&buf_out->ch_layout, 1ULL << channel); - if (ret < 0) + if (ret < 0){ + av_frame_free(&buf_out); return ret; + } return ff_filter_frame(ctx->outputs[i], buf_out); } -- 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".