avformat/matroskaenc: use av_freep() to avoid leaving stale pointers
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 11 Sep 2013 11:19:51 +0000 (13:19 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 11 Sep 2013 11:28:41 +0000 (13:28 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/matroskaenc.c

index 13523f8..7ccabb9 100644 (file)
@@ -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);