1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/oggparsecelt/celt_header: fix memleak

Fixes: CID1108605
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-10-20 16:38:20 +02:00
parent baab248c49
commit b294a4beec

View File

@ -46,7 +46,9 @@ static int celt_header(AVFormatContext *s, int idx)
uint32_t overlap, extra_headers;
priv = av_malloc(sizeof(struct oggcelt_private));
if (!priv || ff_alloc_extradata(st->codec, 2 * sizeof(uint32_t)))
if (!priv)
return AVERROR(ENOMEM);
if (ff_alloc_extradata(st->codec, 2 * sizeof(uint32_t)) < 0)
return AVERROR(ENOMEM);
version = AV_RL32(p + 28);
/* unused header size field skipped */