[FFmpeg-cvslog] matroskadec: fix leak on error

Vittorio Giovara git at videolan.org
Sat Oct 25 04:34:58 CEST 2014


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Fri Oct 24 00:05:52 2014 +0100| [3c1199c3c4cbdb4ffff0de89f06d5a08acefe356] | committer: Vittorio Giovara

matroskadec: fix leak on error

CC: libav-stable at libav.org
Bug-Id: CID 1026767

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

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

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 59fc34b..d3ce009 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2265,6 +2265,7 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska,
     /* XXX: prevent data copy... */
     if (av_new_packet(pkt, pkt_size + offset) < 0) {
         av_free(pkt);
+        av_freep(&pkt_data);
         return AVERROR(ENOMEM);
     }
 



More information about the ffmpeg-cvslog mailing list