summaryrefslogtreecommitdiff
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-03 16:07:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-03 16:08:38 +0200
commit2fe4b6210c4b56ecfe4668c78611a8a679303511 (patch)
treeb34409d35e47def940f659f4cec61ea570348d76 /libavformat/matroskadec.c
parent0722b4d08cd6360509a2789cd7a2f3895cec225e (diff)
matroskadec: fix memleak of pkt_data
Fixes: CID1026767 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index ec52b50214..81691e97db 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) {