diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-26 21:31:15 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-26 21:31:15 +0200 |
commit | 9b1d7d4fd38f6b87f0ef5b75ff99e5e62b96ca43 (patch) | |
tree | 65ff7892eb472e791c3935e0290d2568601a8ed7 | |
parent | 68de2115ca1a2095848dd8d8655ee49812b250de (diff) | |
download | ffmpeg-9b1d7d4fd38f6b87f0ef5b75ff99e5e62b96ca43.tar.gz |
avformat/oggparsecelt: fix memleak
Fixes: CID1108605
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/oggparsecelt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/oggparsecelt.c b/libavformat/oggparsecelt.c index f3c2c1a632..d6e9962650 100644 --- a/libavformat/oggparsecelt.c +++ b/libavformat/oggparsecelt.c @@ -48,8 +48,10 @@ static int celt_header(AVFormatContext *s, int idx) priv = av_malloc(sizeof(struct oggcelt_private)); if (!priv) return AVERROR(ENOMEM); - if (ff_alloc_extradata(st->codec, 2 * sizeof(uint32_t)) < 0) + if (ff_alloc_extradata(st->codec, 2 * sizeof(uint32_t)) < 0) { + av_free(priv); return AVERROR(ENOMEM); + } version = AV_RL32(p + 28); /* unused header size field skipped */ sample_rate = AV_RL32(p + 36); |