From patchwork Mon Jan 1 16:28:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Derek Buitenhuis X-Patchwork-Id: 7063 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.79.195 with SMTP id r64csp13756763jad; Mon, 1 Jan 2018 08:35:00 -0800 (PST) X-Google-Smtp-Source: ACJfBovVj/+rL4DmDRbx+P+3W5z9Y1IGrlJC8RBgf8zJbInMatb1qFWlvZbdwSWvQOUX6ZpClqkA X-Received: by 10.28.152.74 with SMTP id a71mr31457319wme.22.1514824499930; Mon, 01 Jan 2018 08:34:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514824499; cv=none; d=google.com; s=arc-20160816; b=K3DB/3Djr0QfIBHlqloFrUdMxIOJb3BKE+P3Ees00zAT5Xljczdvvklx9JRq4dBNmx fdsswh1VUJTHVhSQwS158/3FB5hQYHGVusDcqvF6WKg92jwRPuR0QTF1bjROdI/ACbED 4bGfO6DmOIUFGcio7JbPlHOgioRC/WOwkiPgNOrjNpIYF6vzafoaPcg+9eLRJNA1k1Z8 MTomPK2qVM3i1TsPOsvw5MxnJSl9+Q8zZEhCmks4QmlNiuUw5bAWIj2bIdFDVya+moMh gXeroB8MZT7wPz3a7Qepzu05M+15mX0wgep7mq+1wlcgcIrXcwQr8dmumQtHzV+u6QFc 54IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=oNzCtFkiycw2EiHUC5sLY36/wrwohfbE3NGFzUHldrE=; b=qZY1J26N9+CNZWTFcYWezxetd/P1H+24f4lNA8yKbTVKxWK2idiDlAzkSC7dxIZ5tt fSZg8zOf4KE1avKdh+8LhxjyM2dLyy9uSi84tJIru/4dlXos6z1OOtauj2y+BHotnyO2 lSkqNtTK8KlJGeGcCZ6wMryQu88YhUdSYSPHdNNTxC6101WcKaFJgR69ia59eOkCMiLW /avvDc/l/PwN1YFZf7RJjp9XvqvHXDJgPZVGGxPKhVVKqsxpXT1XY3oMaV1f3/44e9Ar chN/4PIaKPlQ5f9KBQfbUCwkJWbn+PiXKPC8wcG7nnTNTgGHSEdV8VoMj4lGmdlZ6H/y 3G6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=C7qkMpq6; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i75si20313664wmg.99.2018.01.01.08.34.59; Mon, 01 Jan 2018 08:34:59 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=C7qkMpq6; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B3C1D688274; Mon, 1 Jan 2018 18:34:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E196E680A4E for ; Mon, 1 Jan 2018 18:34:36 +0200 (EET) Received: by mail-wr0-f194.google.com with SMTP id y9so4586270wrb.5 for ; Mon, 01 Jan 2018 08:34:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=E6lD7rv1/VXtj8EFdLbbQiSMSOx++W8+0qulxlHK3as=; b=C7qkMpq6XVmXkb5ea2vbGdD69JSMm1wd5n/X+yHPopZXnhd2HRTKqTh+P1H5S3Ew7L R4NHiecq4yjUDLA0jZgh8FZWcEiBaBn6D3DD3FHkTPD4OBME28/ijR9YcniYnZkbTtYn X6ALEGR7y5ojcb0E1IJa885GU1UdPAGJpB0oCw5zK2vcLZarTKFoaqWeTUxK2mVtwbew /Q3Tr0uVKCx6sr/jV9nl3V2GL5fyHis76l+StLDpzhT6PDEH6MR5YL4RPmhpy6GSvr0t dO0zVI8G9/8HBL3awzmE4rEcisw2B10vZOk7fvPJhoMtU+Nncqf9WMbDS2+IdNHnHy6H qO2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=E6lD7rv1/VXtj8EFdLbbQiSMSOx++W8+0qulxlHK3as=; b=Skjiho1bWZOkegvWBr8buqbLxrQYtj+h4tpkchLren4YQwngbXyb0rtK8TPdafq4me dDspgRgJsyw85pb9WoiB4mtGkVJSOW8SS7dFVWn6CLimGTKWRsmCW71e5SET9VVQ5TJN 1PNrzsobSCnovT49Hxch5OnhMNAAwwgZD/1mHDPyLVSX+gt9AAYMoy/YnTDuWzmRP63O oH/ynC0yEQcVyrDZWv78EKbHxL0aedkZ8Mibj7FDCbWtZp3zowN/KXbIPmwJvCr+DZk9 dNTdcIEYThSHBz+5RuRfwddaDnV/gA+d8gS20VlKM0WsCIXtc7Z9UXPFIDzGCSWTLY2U ZPtA== X-Gm-Message-State: AKGB3mIhiLYtPK3eKUhWnTvmx0I+kqgdrlc87CJJ7MFZDXXaBmeptJRQ GYkzWv2/i8ukNT9suT8rk9hIzB6Q X-Received: by 10.223.142.98 with SMTP id n89mr35899458wrb.120.1514824158971; Mon, 01 Jan 2018 08:29:18 -0800 (PST) Received: from vimeo-vm.localdomain ([154.57.238.96]) by smtp.gmail.com with ESMTPSA id o16sm34576961wmi.29.2018.01.01.08.29.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jan 2018 08:29:18 -0800 (PST) From: Derek Buitenhuis To: ffmpeg-devel@ffmpeg.org Date: Mon, 1 Jan 2018 11:28:37 -0500 Message-Id: <1514824117-15587-3-git-send-email-derek.buitenhuis@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1514824117-15587-1-git-send-email-derek.buitenhuis@gmail.com> References: <1514824117-15587-1-git-send-email-derek.buitenhuis@gmail.com> Subject: [FFmpeg-devel] [PATCH 2/2] vf_paletteuse: Don't free the second frame from ff_framesync_dualinput_get_writable on error X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This fixes a double free in he error case. Signed-off-by: Derek Buitenhuis --- This does fix the double free, but I am unsure if it is the correct free to removed to fix it. Comments welcome. --- libavfilter/vf_paletteuse.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c index ede2e2e..c2d0c6b 100644 --- a/libavfilter/vf_paletteuse.c +++ b/libavfilter/vf_paletteuse.c @@ -1037,7 +1037,6 @@ static int load_apply_palette(FFFrameSync *fs) error: av_frame_free(&master); - av_frame_free(&second); return ret; }