From: Pierre-Anthony Lemieux <p...@palemieux.com> --- 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-requ...@ffmpeg.org with subject "unsubscribe".