avcodec/iff: Cleanup on init failure
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 18 Jun 2017 12:05:12 +0000 (14:05 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 18 Jun 2017 12:05:57 +0000 (14:05 +0200)
Fixes: memleak
Fixes: 2272/clusterfuzz-testcase-minimized-5059103858622464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/iff.c

index 075ada6..33cf2e3 100644 (file)
@@ -1878,6 +1878,7 @@ AVCodec ff_iff_ilbm_decoder = {
     .init           = decode_init,
     .close          = decode_end,
     .decode         = decode_frame,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
     .capabilities   = AV_CODEC_CAP_DR1,
 };
 #endif