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

Michael Niedermayer git at videolan.org
Thu Feb 12 18:12:01 CET 2015


ffmpeg | branch: release/2.5 | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 22 11:51:55 2014 +0100| [bd78b9416d54fe0b3f4a69907420c7fa3ebc4ff8] | committer: Michael Niedermayer

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

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

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

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

diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c
index 88e2229..fd3b583 100644
--- a/libavformat/riffdec.c
+++ b/libavformat/riffdec.c
@@ -114,7 +114,7 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
             size   -= 22;
         }
         if (cbSize > 0) {
-            av_free(codec->extradata);
+            av_freep(&codec->extradata);
             if (ff_get_extradata(codec, pb, cbSize) < 0)
                 return AVERROR(ENOMEM);
             size -= cbSize;



More information about the ffmpeg-cvslog mailing list