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 1676F4635D for ; Mon, 15 May 2023 15:28:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C6D8068BEE0; Mon, 15 May 2023 18:28:33 +0300 (EEST) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C1DC268B6C6 for ; Mon, 15 May 2023 18:28:27 +0300 (EEST) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-643846c006fso13705130b3a.0 for ; Mon, 15 May 2023 08:28:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684164505; x=1686756505; 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=o9OJ83dbZ2RdM0cMGNk3Tgfw2YjVRpg30Scya90wH6I=; b=lPypz9Mh/BlR0RoQb2I9277yBkeEZFXqQ79q4Vj7I6nXvPjZ+1utboM4IgQdsBMdk+ v8drS20ejFa/K+DaDx2AzzUTQTrJirCbqKkTHqmZHBYlV3qcrmBTWVXubD5p+1CZkc8d aascvzyOYDIggudugwC2vz/EoSIz1UGSccecmDTKql9cHDwtANRAobpQeBOnAljXkdEo 1FEfocdjzeM0R+0O17jZey7O2Wshy+3+ZrOcnqtlhIv6lCjdWMm9P1lr7E79WK/MDJik xhLH3McTIlt9z9srVTJeRMvd++o8RCgZe7tXKazLZ+xpnT5oa6LRbSmUaPDySH6pFLBx I32Q== X-Gm-Message-State: AC+VfDyYRSYPWQ9BhFI4TAqgtmIWjt9KdM6Ezb6IZOfeZT+PTo962ZLW alQTt5OU5G1msoP3qzDZInKONxP53vw= X-Google-Smtp-Source: ACHHUZ73A/mEOAyOpuSpiQcO3jkMtJpJtB/5A0Dz2MyJxKG+muuGADFw9woqCXQsPUqlo71Q35MiLA== X-Received: by 2002:a05:6a21:6da3:b0:101:438d:2567 with SMTP id wl35-20020a056a216da300b00101438d2567mr28338796pzb.31.1684164504846; Mon, 15 May 2023 08:28:24 -0700 (PDT) Received: from localhost (76-14-89-2.sf-cable.astound.net. [76.14.89.2]) by smtp.gmail.com with ESMTPSA id n11-20020a17090a9f0b00b0025023726fc4sm18643126pjp.26.2023.05.15.08.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 08:28:24 -0700 (PDT) Received: by localhost (sSMTP sendmail emulation); Mon, 15 May 2023 08:28:16 -0700 From: pal@sandflow.com To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 May 2023 08:28:11 -0700 Message-Id: <20230515152812.23405-1-pal@sandflow.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v1 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 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libavformat/tests/imf.c b/libavformat/tests/imf.c index cfd84fb8c8..a5bdf16645 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,12 @@ 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) { + ret = 1; + } else 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".