From patchwork Wed May 15 07:12:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyan Doshi X-Patchwork-Id: 13121 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 5181E449639 for ; Wed, 15 May 2019 10:12:59 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2A3C668A1C0; Wed, 15 May 2019 10:12:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mx2.mailbox.org (mx2.mailbox.org [80.241.60.215]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 48E416899DB for ; Wed, 15 May 2019 10:12:52 +0300 (EEST) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 5EE20A2B3B for ; Wed, 15 May 2019 09:12:52 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id swEzJORaPfSl for ; Wed, 15 May 2019 09:12:26 +0200 (CEST) To: FFmpeg development discussions and patches From: Gyan Message-ID: <15676ccb-311e-d10e-aba7-08ce40791c9d@gyani.pro> Date: Wed, 15 May 2019 12:42:13 +0530 MIME-Version: 1.0 Content-Language: en-US Subject: [FFmpeg-devel] [PATCH] avfilter/drawtext: stop resource leak 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" See http://www.ffmpeg.org/pipermail/ffmpeg-devel/2019-May/244029.html Gyan From 22f3b816e8da13877872a2e6ac408fc32de7d561 Mon Sep 17 00:00:00 2001 From: Gyan Doshi Date: Wed, 15 May 2019 12:36:05 +0530 Subject: [PATCH] avfilter/drawtext: stop resource leak Fixes Coverity CID 1445099 --- libavfilter/vf_drawtext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index b166574d71..01cd7fa122 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -894,7 +894,7 @@ static int command(AVFilterContext *ctx, const char *cmd, const char *arg, char ctx->priv = old; uninit(ctx); - av_freep(old); + av_freep(&old); ctx->priv = new; return config_input(ctx->inputs[0]); @@ -903,7 +903,7 @@ static int command(AVFilterContext *ctx, const char *cmd, const char *arg, char fail: av_log(ctx, AV_LOG_ERROR, "Failed to process command. Continuing with existing parameters.\n"); - av_freep(new); + av_freep(&new); return ret; }