diff mbox series

[FFmpeg-devel] tools/target_dem_fuzzer: use avio_context_free() to free the fuzzer's AVIOContext

Message ID 20201114202008.955-1-jamrial@gmail.com
State Accepted
Commit 40dfb4328d12f782190d4e38abb443e705315ccd
Headers show
Series [FFmpeg-devel] tools/target_dem_fuzzer: use avio_context_free() to free the fuzzer's AVIOContext
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

James Almer Nov. 14, 2020, 8:20 p.m. UTC
The doxy for avio_alloc_context() states it must be used for this.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 tools/target_dem_fuzzer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/target_dem_fuzzer.c b/tools/target_dem_fuzzer.c
index e4f41765d6..e5c41eea01 100644
--- a/tools/target_dem_fuzzer.c
+++ b/tools/target_dem_fuzzer.c
@@ -202,7 +202,7 @@  int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
     }
 end:
     av_freep(&fuzzed_pb->buffer);
-    av_freep(&fuzzed_pb);
+    avio_context_free(&fuzzed_pb);
     avformat_close_input(&avfmt);
 
     return 0;