[FFmpeg-cvslog] matroskadec: favor av_freep()

Michael Niedermayer git at videolan.org
Mon Jun 3 16:16:23 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jun  3 16:05:09 2013 +0200| [0722b4d08cd6360509a2789cd7a2f3895cec225e] | committer: Michael Niedermayer

matroskadec: favor av_freep()

av_freep() is safer as it zeros the pointer

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

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

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

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 60bb73b..ec52b50 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2276,7 +2276,7 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska,
     memcpy(pkt->data + offset, pkt_data, pkt_size);
 
     if (pkt_data != data)
-        av_free(pkt_data);
+        av_freep(&pkt_data);
 
     pkt->flags = is_keyframe;
     pkt->stream_index = st->index;



More information about the ffmpeg-cvslog mailing list