From patchwork Sun Sep 29 16:46:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Thompson X-Patchwork-Id: 15394 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id DF0DB44A8D9 for ; Sun, 29 Sep 2019 19:53:41 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AE5D26881DE; Sun, 29 Sep 2019 19:53:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DAFBC688196 for ; Sun, 29 Sep 2019 19:53:34 +0300 (EEST) Received: by mail-wm1-f67.google.com with SMTP id m18so10153462wmc.1 for ; Sun, 29 Sep 2019 09:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=uO/ILjJgAEbq1gxRFVsMNiugFsMrx+XYgRSLTpAcgyY=; b=Vuni0OSpbYvHW8n/fjk8MNongjowAoq8RjxV2huj2aXIIH5YeybugZ/Rhei/MEgCOB LlHzOiw/XNnNcf49ZymFtmm7tV35D/68YlKaj3vMbyMuA4Ddb35yVjdXWT06+JrCgwj3 sxkBytOKFUHmWtZdecmjpxmloW10zURwy1EaZLpCRYU+u5jM5VrEuIsrKK1V/RqPHTgw U8gA1j1jx2VT5lQnUDs+rIHmOyXLrXUybFYkBBMBC8Us2YOaDagQag9VovQYEu5N0yKG MZiaogsolpOsKnaxjjnNIeev0xuuIv1Ypj0vnhdOOSiAH72eCTfFYoMW0Ik7/FoxMo1F AxQQ== 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:mime-version:content-transfer-encoding; bh=uO/ILjJgAEbq1gxRFVsMNiugFsMrx+XYgRSLTpAcgyY=; b=KyY2xOgSny7GeXoilKF5IX3I5nPWN3vX3Ub+Xja85t8xOwRSCxfwENk7Vw5XRzEQml pb7pQegFegpne5XWKGLhgihSE0AuVnXqTyBsDwBgcq9W6eehzi0Dm3q8TL/f0sxul8ds CYBSE1/EjCrXCOOKkq8mapgjgD5JZsy/DFZ1Xz1kmHdSZvkJl0DpmOYHdjX99HGDxdfq g7lkNoO1vlJab6iuTQ0iOxO3gIopbkQgUOz4O1AcDtq4DK3MCQJIulqzeyWcp+82zcO9 trZxqVz2Vd2VW4OBxtDIykaHXHxWAil+jqsrx82ByTxIkzrXZCtvEr5aP0ZrWmN6FqLL BQ3w== X-Gm-Message-State: APjAAAVUYvuGzgiUuTRowDvUhnJGPpU07i3XhDetyM8BtL4KZLKnxH7/ JHAtWQrKk9j7n2OzG0IklEtHgy1dCnQ= X-Google-Smtp-Source: APXvYqztedxZpx6l3oIS674JU7qJ/1yAb4CB4b6jYQMIdh/dz1pCr3qWvwnfoCoeeCLw6wCzLtGrPQ== X-Received: by 2002:a1c:1b14:: with SMTP id b20mr13232613wmb.122.1569775572291; Sun, 29 Sep 2019 09:46:12 -0700 (PDT) Received: from rywe.jkqxz.net (cpc91242-cmbg18-2-0-cust650.5-4.cable.virginm.net. [82.8.130.139]) by smtp.gmail.com with ESMTPSA id s10sm27274658wmf.48.2019.09.29.09.46.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2019 09:46:11 -0700 (PDT) From: Mark Thompson To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Sep 2019 17:46:02 +0100 Message-Id: <20190929164605.20835-6-sw@jkqxz.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190929164605.20835-1-sw@jkqxz.net> References: <20190929164605.20835-1-sw@jkqxz.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/8] lavfi/vf_deshake_opencl: Fix use of uninitialised variable in error case 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Fixes CID 1452756 and 1452757. --- libavfilter/vf_deshake_opencl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_deshake_opencl.c b/libavfilter/vf_deshake_opencl.c index c959f19475..c914a77d83 100644 --- a/libavfilter/vf_deshake_opencl.c +++ b/libavfilter/vf_deshake_opencl.c @@ -1128,7 +1128,7 @@ static int deshake_opencl_init(AVFilterContext *avctx) AVFilterLink *inlink = avctx->inputs[0]; // Pointer to the host-side pattern buffer to be initialized and then copied // to the GPU - PointPair *pattern_host; + PointPair *pattern_host = NULL; cl_int cle; int err; cl_ulong8 zeroed_ulong8; @@ -1348,8 +1348,7 @@ static int deshake_opencl_init(AVFilterContext *avctx) return 0; fail: - if (!pattern_host) - av_freep(&pattern_host); + av_freep(&pattern_host); return err; }