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

Michael Niedermayer git at videolan.org
Mon Dec 22 12:47:47 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 22 11:51:55 2014 +0100| [fd3e7447c83b7a652b66e3a4334e4335d232d77e] | 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=fd3e7447c83b7a652b66e3a4334e4335d232d77e
---

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

diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c
index edaf146..f44df1e 100644
--- a/libavformat/riffdec.c
+++ b/libavformat/riffdec.c
@@ -132,7 +132,7 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size, int big_
             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