[FFmpeg-cvslog] avformat/oggparsecelt: fix memleak
Michael Niedermayer
git at videolan.org
Sat Apr 26 21:40:29 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Apr 26 21:31:15 2014 +0200| [9b1d7d4fd38f6b87f0ef5b75ff99e5e62b96ca43] | committer: Michael Niedermayer
avformat/oggparsecelt: fix memleak
Fixes: CID1108605
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9b1d7d4fd38f6b87f0ef5b75ff99e5e62b96ca43
---
libavformat/oggparsecelt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/oggparsecelt.c b/libavformat/oggparsecelt.c
index f3c2c1a..d6e9962 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);
More information about the ffmpeg-cvslog
mailing list