Message ID | 20200914052747.124118-14-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | 29c5c8fdfb4f7c3fe22260d73e9ade7e54330a7d |
Headers | show
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> 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 E46494480DE for <patchwork@ffaux-bg.ffmpeg.org>; Mon, 14 Sep 2020 08:34:26 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CB70968BC2A; Mon, 14 Sep 2020 08:34:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DEABC68BBA1 for <ffmpeg-devel@ffmpeg.org>; Mon, 14 Sep 2020 08:34:24 +0300 (EEST) Received: by mail-lf1-f65.google.com with SMTP id z19so12013326lfr.4 for <ffmpeg-devel@ffmpeg.org>; Sun, 13 Sep 2020 22:34:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MjGHfXYiPPHfxBUwQEWGgidokQv8dXr6Lqixc7cWHAY=; b=sHEN8gdgU2GdWNB7FGy9yFQ0Il8B/0Kbs6q3NlEkt4xF34XMUarbLny6YYEKrXn07H UU3h7CL1DbGDc8MYUSSCDsl51nfucyTBe+5naRj0CYhWmW52tn5HVYNwQUAqLZYAboh9 5YdGSRxyyatNfY01TeXN3IEJItUXY9ZxX/civFcONcjk+7xaH65ksCINbud3pXa8Pfal 224hj9KIPszil7/LhLl8B5/dovFtLhdU7tqccg/GYMV0JcM+i4FdZb3PCbwF5cwcuIzX x5arXc5nT04rMUNyfyn3/cx4b1+VN8XKQacN8aTOsUXt70MMbMkaMvEyr2AVMB4UQHi3 HVkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MjGHfXYiPPHfxBUwQEWGgidokQv8dXr6Lqixc7cWHAY=; b=GoMvYyxo4jlZwLD6sZGDJXYGVTforCw1LjN1aumJGmkTz1ms6HZLGAsCjUT9FcYg8w QUx1C2JvjrvcfZUidZytmaEfaxmhGLyv91RfobpNafsdHzPwv7xUBmK2COSSITY1ZwaU NYOj7jLTOlhWaEQmzY0YtVEP+hbYQ/Zevnzsct5gJqOINUg413E1lVSbwnP2igYKl+oY +CdyZgVaja9V4CpR30lGmkPb4fIqX3L6V6N1D/mY2lM63qnluYDNJtoumsCLSNYnOiAp l/TdFTAw9gTBtA0lAR8dAvmzK6onzuO1kwZw5XSCnYYC3G8ltpQxaeTVa2yrazvvV90w KX2Q== X-Gm-Message-State: AOAM531UE3K+j1y0WBYo+nbXoZKXtp+IM1QUpihGkaFTsSu1B8mWkwif fhO+x0lqNMeIheCgB7QW7nvWXfXCCvA= X-Google-Smtp-Source: ABdhPJzMXF89AXFejYGo7tTt6nXSqG/cRzJmMbtrs2IW2Od7b19u5GpPsDcrpG0Cu5AR3aubQ5pdiw== X-Received: by 2002:a17:906:b74a:: with SMTP id fx10mr12707431ejb.232.1600061308619; Sun, 13 Sep 2020 22:28:28 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1fb0f.dynamic.kabel-deutschland.de. [188.193.251.15]) by smtp.gmail.com with ESMTPSA id f4sm8251421edm.76.2020.09.13.22.28.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Sep 2020 22:28:28 -0700 (PDT) From: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> To: ffmpeg-devel@ffmpeg.org Date: Mon, 14 Sep 2020 07:27:37 +0200 Message-Id: <20200914052747.124118-14-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200913025753.274772-1-andreas.rheinhardt@gmail.com> References: <20200913025753.274772-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 30/40] avcodec/cngenc: Replace av_free() by av_freep() in close function X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> |
Series |
[FFmpeg-devel,01/16] avcodec/snowdec: Use ff_snow_common_init() directly
|
expand
|
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
diff --git a/libavcodec/cngenc.c b/libavcodec/cngenc.c index e185c4a40a..8f23b7555a 100644 --- a/libavcodec/cngenc.c +++ b/libavcodec/cngenc.c @@ -37,8 +37,8 @@ static av_cold int cng_encode_close(AVCodecContext *avctx) { CNGContext *p = avctx->priv_data; ff_lpc_end(&p->lpc); - av_free(p->samples32); - av_free(p->ref_coef); + av_freep(&p->samples32); + av_freep(&p->ref_coef); return 0; }
This avoids leaving pointers to already freed memory in memory. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/cngenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)