[FFmpeg-cvslog] matroskadec: fix memleak of pkt_data

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


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jun  3 16:07:06 2013 +0200| [2fe4b6210c4b56ecfe4668c78611a8a679303511] | committer: Michael Niedermayer

matroskadec: fix memleak of pkt_data

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

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

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

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index ec52b50..81691e9 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2264,7 +2264,8 @@ static int matroska_parse_frame(MatroskaDemuxContext *matroska,
     /* XXX: prevent data copy... */
     if (av_new_packet(pkt, pkt_size + offset) < 0) {
         av_free(pkt);
-        return AVERROR(ENOMEM);
+        res = AVERROR(ENOMEM);
+        goto fail;
     }
 
     if (st->codec->codec_id == AV_CODEC_ID_PRORES) {



More information about the ffmpeg-cvslog mailing list