avcodec/ffv1: dont leave stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 13 Apr 2015 18:08:42 +0000 (20:08 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 13 Apr 2015 18:08:42 +0000 (20:08 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ffv1.c

index aada565..7a38bf9 100644 (file)
@@ -140,7 +140,7 @@ av_cold int ffv1_init_slice_contexts(FFV1Context *f)
         fs->sample_buffer = av_malloc_array((fs->width + 6), 3 * MAX_PLANES *
                                       sizeof(*fs->sample_buffer));
         if (!fs->sample_buffer) {
-            av_free(fs);
+            av_freep(&f->slice_context[i]);
             goto memfail;
         }
     }