diff options
author | Pierre-Anthony Lemieux <pal@palemieux.com> | 2023-05-15 11:29:45 -0700 |
---|---|---|
committer | Pierre-Anthony Lemieux <pal@palemieux.com> | 2023-05-18 15:03:15 -0700 |
commit | dbe43bca25b84f2c2f5f713eeff5ab2dae89fc25 (patch) | |
tree | 3dd17cff8ac0faff9f7710759d0cbaff3e1ed0cb | |
parent | a2a0a81184df586d7b567d7b60d55d0e86376963 (diff) | |
download | ffmpeg-dbe43bca25b84f2c2f5f713eeff5ab2dae89fc25.tar.gz |
fate/imf: fix memory leak
-rw-r--r-- | libavformat/tests/imf.c | 11 |
1 files changed, 10 insertions, 1 deletions
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; |