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 7330146375 for ; Mon, 15 May 2023 18:33:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1E8BF68BF33; Mon, 15 May 2023 21:33:20 +0300 (EEST) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 06F6D689BA9 for ; Mon, 15 May 2023 21:33:13 +0300 (EEST) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-6436dfa15b3so8884344b3a.1 for ; Mon, 15 May 2023 11:33:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684175592; x=1686767592; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YwfQASacb7KSnDq1fcBPzOOGgaRqGc81RHAV9jH/Fsw=; b=c+LQ1xDWynDn1VpqQIu3rakxkSeI6Zfq5k2kWSKv6q04R4/+hRMEwC+p8pg1gFmZGx EAL8xTs39v30AsTrQU/6lqeJS8qTts32ZLnOf6Tc1uqyekBuJymuZ8TgsoTKr4B1Gntc XicmjtlZEY1i+PssR3vwRNo0uXcmtADO3wQ70AuChwI4gZ5kZQg8fe7XFiuIv32NHGNO IE4x1sLcWqTGyqodxrsTmnPIMBdhZDCKz4qw1R97XYuMeP7g+e3G0sXW0RNpjyI3tU2A it64CrXDbHZCWQG7OArGGuIUPLZikagJHxDnvBwwxkNtEMmCPR+GvbkEjibEqOE3vOjx FJ3w== X-Gm-Message-State: AC+VfDwnFY1qm/esNAgOZ7StFsRBzagkUMPJcQCOvuw0EcT1VGwOosTN 1C9TWkxxZGO6zPqXKUz9y/oZ9dJysAU= X-Google-Smtp-Source: ACHHUZ40C6O3MvsDykTryOHusBLiNsFZsHC8smjGvTzdXk0In1pkwcAHYGurRjY3QYnyjfDx9n6Dnw== X-Received: by 2002:a05:6a00:2393:b0:63b:5c82:e21a with SMTP id f19-20020a056a00239300b0063b5c82e21amr44187495pfc.1.1684175591673; Mon, 15 May 2023 11:33:11 -0700 (PDT) Received: from localhost (76-14-89-2.sf-cable.astound.net. [76.14.89.2]) by smtp.gmail.com with ESMTPSA id j19-20020a62e913000000b0063b7c42a070sm12077067pfh.68.2023.05.15.11.33.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 11:33:11 -0700 (PDT) Received: by localhost (sSMTP sendmail emulation); Mon, 15 May 2023 11:33:03 -0700 From: pal@sandflow.com To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 May 2023 11:32:59 -0700 Message-Id: <20230515183300.7252-1-pal@sandflow.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 1/2] fate/imf: fix memory leak 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 Cc: Pierre-Anthony Lemieux 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: From: Pierre-Anthony Lemieux --- libavformat/tests/imf.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libavformat/tests/imf.c b/libavformat/tests/imf.c index cfd84fb8c8..c02cd87ceb 100644 --- a/libavformat/tests/imf.c +++ b/libavformat/tests/imf.c @@ -402,6 +402,9 @@ static int test_bad_cpl_parsing(FFIMFCPL **cpl) return ret; } + ff_imf_cpl_free(*cpl); + *cpl = NULL; + return 0; } @@ -423,6 +426,9 @@ static int test_bad_resource_cpl_parsing(FFIMFCPL **cpl) return ret; } + ff_imf_cpl_free(*cpl); + *cpl = NULL; + return 0; } @@ -594,8 +600,11 @@ int main(int argc, char *argv[]) printf("#### End failing test ####\n"); printf("#### The following should emit errors ####\n"); - if (test_bad_resource_cpl_parsing(&cpl) != 0) + if (test_bad_resource_cpl_parsing(&cpl) != 0) { + if (cpl) + printf("Improper cleanup after failed CPL parsing\n"); ret = 1; + } printf("#### End emission of errors ####\n"); return ret; -- 2.25.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".