From patchwork Sun Jun 9 15:47:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 49756 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:c209:0:b0:460:55fa:d5ed with SMTP id d9csp2069033vqo; Sun, 9 Jun 2024 08:48:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVueZ4BlMZ1Sn+W56uLWWg2qOdo3Ygy5MxFESoWBitV+Dkk12JZAXhTVJOrV2ZA073Yg1N8/cHZFo3XyJLz/vX+xyQ10ByeFYWrJA== X-Google-Smtp-Source: AGHT+IEjvYeoGMRoK9ql1ROeZKhcDGUSnBkvwGLD0LOaKTipl+a8euQwZopiXdIl4h/e9EbQK2WF X-Received: by 2002:a50:999d:0:b0:57c:6ae2:abda with SMTP id 4fb4d7f45d1cf-57c6ae2ac5emr3089458a12.5.1717948125459; Sun, 09 Jun 2024 08:48:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717948125; cv=none; d=google.com; s=arc-20160816; b=i/bPt1tEF3ve5ThZCRoP7eW1Y9xC4fccAIPy5yHViBsTAqDYY5jlFLHCNf0BMzmS0J CtDbSbVhSv1jN6tJMlze/xWDQZljXs9ZLvbmvprQNqZsZqfXL24Wxdm8SW9K14WBzzt3 mqpGs97Ee686FB6nutocGbhmsMkYwmgD2jspnQQoCiMXv0/9qxOO6zb0xhv0jt3VZyfk gpiwd3glbOso0e0lnwuBk/gcVy3VznK+70RcnMF/v1hVALj/zlDcCoeBhVmEoHNKZfbw +s1rOzNRGOduTNai4CGnp2K0Z6Z1drwknhFCQup3605UraMigVYonVKjEgBDNP/F6re5 chrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=mdeNEI8jQ/dzyjAEciFlTXqUZII+x4cNw4RGg2RnqyE=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=eQcP1l/F09aaW++cjq9rHtZrB7ZZ7PzRH6NRzJAZhX/noEYV98GYq+Kpt/7w28nuyl Pv+zjMR3AEYYGvm+Ur/3daPsdOYy5MAW8mnJIhL2FG06fjZx3aHrUSj2ZQ70fc/9mEZX Fb3ya8jn/krj7ki1uGndALSeBNaYxC04W26YMFeFvgmCI95K2+4goH0u52bAs/fBLu0j qYoGBY9hf0NxjIHIP23GtCJh40kKehU23b4WY/CQ+ErMY+Lw8vJNvsDQrX3XY1/IrDaP nDlXUdfNEThqm+4chZ11NwZGQuKriLYNjof9psW4qNUKK/Vucwf/WYKwKFtiUwVrPEw7 h2uw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=JcQ7jhXj; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-57c770e970csi714303a12.207.2024.06.09.08.48.44; Sun, 09 Jun 2024 08:48:45 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=JcQ7jhXj; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4053468D647; Sun, 9 Jun 2024 18:48:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D110768D5F1 for ; Sun, 9 Jun 2024 18:47:52 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3F513E0005 for ; Sun, 9 Jun 2024 15:47:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717948072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6XQxeV1rGH2PJDPR2jT8IO2rQbOPlLtQQJVkapkkyS4=; b=JcQ7jhXjZoz8yMDs/SvxO17Z0wy2/+u0P9oEVEYzXnvJ61o9TzeqIkbTTzPWi+wGVysQrV nUXf8zPZxLR/XdBZ6ClCyM5MP5JTdYyVYcA7Ff+l71Zi9X2mQbguioIDL0b1Sp7pMAIshQ S+6rxgu9WQDOPhzs6e4daGAKHb+jgGzHkrg6Cv+esE7z730IibS/ACo2FhIpG+aJyXR/MB qvuSHosIQRJN0ax/IaBXLVRMfFNRiCMKe3yrgsfiQ16gYzZPvLgC8JDHekTgfYWfHHZlst JgDqHFjBO6qj+pu3csxw33E3jFdXfaUeJdftWS4NHxByWHqvM44Y9cCQOv/tOA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 9 Jun 2024 17:47:46 +0200 Message-ID: <20240609154746.4173264-6-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240609154746.4173264-1-michael@niedermayer.cc> References: <20240609154746.4173264-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 6/6] avfilter/af_aderivative: Free out on error 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: um8bczSS5puC Fixes: CID1197065 Resource leak Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/af_aderivative.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/af_aderivative.c b/libavfilter/af_aderivative.c index eeaa23ff88d..4883972dcf1 100644 --- a/libavfilter/af_aderivative.c +++ b/libavfilter/af_aderivative.c @@ -126,6 +126,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) s->prev = ff_get_audio_buffer(inlink, 1); if (!s->prev) { av_frame_free(&in); + av_frame_free(&out); return AVERROR(ENOMEM); } }