From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 421CF460BF for ; Thu, 4 May 2023 23:49:26 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1531468C139; Fri, 5 May 2023 02:49:23 +0300 (EEST) Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6D43568BFC1 for ; Fri, 5 May 2023 02:49:17 +0300 (EEST) Received: by mail-ot1-f49.google.com with SMTP id 46e09a7af769-6a60460a23dso764174a34.0 for ; Thu, 04 May 2023 16:49:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683244155; x=1685836155; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=bY/ejEl0cqPhhomNLMEcUebvuAWTlqfqqJOmgK8QgsI=; b=lynIVM5kuZO5fXUJkhM6ZWriurfb3WHKICJENjk4tauvMVZ5kKjZOXkGrYQSPFS5XW ELg5EaMyOyX5qYWpSpTxvHmFzlAZ90QvJ99qivuo5VKU6uGoxI/2/5/QMxs0E8VcDopM 64RBs30R4sK4+YyXFjY7y0HqcRBc/O1BK2Laz15bAreYhesK55aQME9oyr7uxA1/fVDW sp+i8f4nNcF6v0U0cMIRulu+2Wi1SbzwpxDZaF2R+oN3lXXy6NxYB9TIVasQ1+BrCEa8 e44WcZlktRaILbElArCb+MRLptQX+q2cVGSn3Q0RP7wZky6tjVjKAHEr/+KGD6rrEPuw iJ4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683244155; x=1685836155; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bY/ejEl0cqPhhomNLMEcUebvuAWTlqfqqJOmgK8QgsI=; b=HtuAMU2LrPMzFKptbVOw6mwo09CicwlRWiSD+Dp8n4zpQ9FlqrLi61qliexSa3Suic dJApA2s7W6FV/NZvwu+e0XN+7bVlKnT6mIQoS77PCC+B5K2GDtFetqOq1yRGZv9NJzpO Gz1Mi7gjP1FQiuJRAqOLjkP+sT67LUjxE1w5523gowoxLlGhy2sty2gZYhCnSFvL70WJ REuG35CAB7OlJ0Nxo3yif1XdKmrJ7bITYgY1YoNWX/zAujA7DcNiLw2AEDBJtplJ0wCp +cGRhagu34QFXbqg7KVwRS3MARPDWp3MLYCCuKj4Y739epvs+gmzVcDZeu00gylUPaiQ CtWg== X-Gm-Message-State: AC+VfDyeTXnpCsqJPNnhCMZ6y6wJZ4o/efkZqDAqO8R7km0N9jkr/z+w 1isFrvPB8nXsDIk7XJ4h/gmOUkxZErw= X-Google-Smtp-Source: ACHHUZ4TcpHOMVNAuGxCOpQ74ZmilSGh1p0VCPnRMWCT14RGPqEV5fSXsxSfkmiXsORlGNP2MkVB6w== X-Received: by 2002:a05:6830:22dc:b0:6a4:1980:2a93 with SMTP id q28-20020a05683022dc00b006a419802a93mr780778otc.29.1683244154824; Thu, 04 May 2023 16:49:14 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id e18-20020a9d7312000000b006a42b16ec7asm175128otk.38.2023.05.04.16.49.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 May 2023 16:49:14 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 4 May 2023 20:48:51 -0300 Message-Id: <20230504234852.3789-1-jamrial@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] doc/examples/transcode_aac: free the converted input samples buffer with av_free 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Fixes -Wuse-after-free warnings. Signed-off-by: James Almer --- doc/examples/transcode_aac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/examples/transcode_aac.c b/doc/examples/transcode_aac.c index bb5681a7c0..7f4ca382b1 100644 --- a/doc/examples/transcode_aac.c +++ b/doc/examples/transcode_aac.c @@ -465,7 +465,7 @@ static int init_converted_samples(uint8_t ***converted_input_samples, fprintf(stderr, "Could not allocate converted input samples (error '%s')\n", av_err2str(error)); - av_freep(&(*converted_input_samples)[0]); + av_free((*converted_input_samples)[0]); free(*converted_input_samples); return error; } @@ -599,7 +599,7 @@ static int read_decode_convert_and_store(AVAudioFifo *fifo, cleanup: if (converted_input_samples) { - av_freep(&converted_input_samples[0]); + av_free(converted_input_samples[0]); free(converted_input_samples); } av_frame_free(&input_frame); -- 2.40.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".