[FFmpeg-cvslog] avformat/flvdec: Use av_freep() avoid leaving stale pointers in memory

Michael Niedermayer git at videolan.org
Tue Jan 20 03:36:17 CET 2015


ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Tue Dec 16 15:03:32 2014 +0100| [f5fd937fc5dfb1be11d467742c77246d5188e2ea] | committer: Michael Niedermayer

avformat/flvdec: Use av_freep() avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 91ea466551c148bd897706a1b6a168e783761a06)

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

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

 libavformat/flvdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 3b6d01a..166ce35 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -614,7 +614,7 @@ static int flv_read_close(AVFormatContext *s)
 
 static int flv_get_extradata(AVFormatContext *s, AVStream *st, int size)
 {
-    av_free(st->codec->extradata);
+    av_freep(&st->codec->extradata);
     if (ff_get_extradata(st->codec, s->pb, size) < 0)
         return AVERROR(ENOMEM);
     return 0;



More information about the ffmpeg-cvslog mailing list