avformat/flvdec: Use av_freep() avoid leaving stale pointers in memory
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 16 Dec 2014 14:03:32 +0000 (15:03 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 16 Dec 2014 14:37:04 +0000 (15:37 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/flvdec.c

index c64b3a9..54f2f56 100644 (file)
@@ -623,7 +623,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;