Browse Source

avformat/oggparsecelt: fix memleak

Fixes: CID1108605

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 11 years ago
parent
commit
9b1d7d4fd3
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavformat/oggparsecelt.c

+ 3
- 1
libavformat/oggparsecelt.c View File

@@ -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);


Loading…
Cancel
Save