[FFmpeg-cvslog] avcodec/ffv1: dont leave stale pointers in memory

Michael Niedermayer git at videolan.org
Mon Apr 13 20:19:33 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Apr 13 20:08:42 2015 +0200| [4d74c8d5503503097e8c6968d37d8a78dc4795e5] | committer: Michael Niedermayer

avcodec/ffv1: dont leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4d74c8d5503503097e8c6968d37d8a78dc4795e5
---

 libavcodec/ffv1.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index aada565..7a38bf9 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -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;
         }
     }



More information about the ffmpeg-cvslog mailing list