diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-12 15:44:32 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-12 16:17:32 +0200 |
commit | f144168d9b7c20f4dc522a5a407c759b3a850c70 (patch) | |
tree | d2dc27f001e5139fdf2223e1377fe1876970c41e /libavcodec/smacker.c | |
parent | fbab9a7c226792fbbd4cd8c636782b62514f760c (diff) | |
download | ffmpeg-f144168d9b7c20f4dc522a5a407c759b3a850c70.tar.gz |
avcodec/smacker: fix some memleaks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/smacker.c')
-rw-r--r-- | libavcodec/smacker.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index 3f0e6c6748..ed78fda7a9 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -212,8 +212,10 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int if(get_bits1(gb)) { res = smacker_decode_tree(gb, &tmp1, 0, 0); - if (res < 0) - return res; + if (res < 0) { + err = res; + goto error; + } skip_bits1(gb); if(tmp1.current > 1) { res = init_vlc(&vlc[0], SMKTREE_BITS, tmp1.length, @@ -231,8 +233,10 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int } if(get_bits1(gb)){ res = smacker_decode_tree(gb, &tmp2, 0, 0); - if (res < 0) - return res; + if (res < 0) { + err = res; + goto error; + } skip_bits1(gb); if(tmp2.current > 1) { res = init_vlc(&vlc[1], SMKTREE_BITS, tmp2.length, |