[FFmpeg-devel] [PATCH] avformat/tests/imf: fix memleak

Zhao Zhili quinkblack at foxmail.com
Fri May 19 20:40:44 EEST 2023


From: Zhao Zhili <zhilizhao at tencent.com>

It breaks fate test with asan.

Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
---
 libavformat/tests/imf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/tests/imf.c b/libavformat/tests/imf.c
index cfd84fb8c8..ee2ca375bf 100644
--- a/libavformat/tests/imf.c
+++ b/libavformat/tests/imf.c
@@ -596,6 +596,8 @@ int main(int argc, char *argv[])
     printf("#### The following should emit errors ####\n");
     if (test_bad_resource_cpl_parsing(&cpl) != 0)
         ret = 1;
+    else
+        ff_imf_cpl_free(cpl);
     printf("#### End emission of errors ####\n");
 
     return ret;
-- 
2.25.1



More information about the ffmpeg-devel mailing list