[FFmpeg-cvslog] avformat/matroskaenc: use av_freep() to avoid leaving stale pointers

Michael Niedermayer git at videolan.org
Wed Sep 11 13:29:54 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Sep 11 13:19:51 2013 +0200| [b5b34c1983730b1704022770a8ce488eeabc841c] | committer: Michael Niedermayer

avformat/matroskaenc: use av_freep() to avoid leaving stale pointers

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

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

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

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 13523f8..7ccabb9 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -365,7 +365,7 @@ static int64_t mkv_write_seekhead(AVIOContext *pb, mkv_seekhead *seekhead)
         currentpos = seekhead->filepos;
     }
 fail:
-    av_free(seekhead->entries);
+    av_freep(&seekhead->entries);
     av_free(seekhead);
 
     return currentpos;
@@ -1685,7 +1685,7 @@ static int mkv_write_trailer(AVFormatContext *s)
     }
 
     end_ebml_master(pb, mkv->segment);
-    av_free(mkv->tracks);
+    av_freep(&mkv->tracks);
     av_freep(&mkv->cues->entries);
     av_freep(&mkv->cues);
 



More information about the ffmpeg-cvslog mailing list