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

Michael Niedermayer git at videolan.org
Mon Dec 15 16:01:34 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 15 15:43:14 2014 +0100| [51b193214dea63762d85a46913d70e602888cad0] | committer: Michael Niedermayer

avformat/avidec: 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=51b193214dea63762d85a46913d70e602888cad0
---

 libavformat/avidec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index a8318ff..f5f7278 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1847,12 +1847,12 @@ static int avi_read_close(AVFormatContext *s)
                 av_freep(&ast->sub_ctx->pb);
                 avformat_close_input(&ast->sub_ctx);
             }
-            av_free(ast->sub_buffer);
+            av_freep(&ast->sub_buffer);
             av_free_packet(&ast->sub_pkt);
         }
     }
 
-    av_free(avi->dv_demux);
+    av_freep(&avi->dv_demux);
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list