[FFmpeg-cvslog] avcodec/flac_parser: use av_freep(), do not leave stale pointers in memory

Michael Niedermayer git at videolan.org
Tue Oct 14 18:44:28 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Oct 14 18:30:15 2014 +0200| [9946da49766384dd6e25585160da0b454d4a5cbc] | committer: Michael Niedermayer

avcodec/flac_parser: use av_freep(), do not 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=9946da49766384dd6e25585160da0b454d4a5cbc
---

 libavcodec/flashsvenc.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c
index 7ad15f1..a6d7caa 100644
--- a/libavcodec/flashsvenc.c
+++ b/libavcodec/flashsvenc.c
@@ -94,9 +94,9 @@ static av_cold int flashsv_encode_end(AVCodecContext *avctx)
 
     deflateEnd(&s->zstream);
 
-    av_free(s->encbuffer);
-    av_free(s->previous_frame);
-    av_free(s->tmpblock);
+    av_freep(&s->encbuffer);
+    av_freep(&s->previous_frame);
+    av_freep(&s->tmpblock);
 
     av_frame_free(&avctx->coded_frame);
 



More information about the ffmpeg-cvslog mailing list