diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-19 13:39:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-19 13:49:17 +0200 |
commit | 93648ee47b8f70159d5f41b8cebf14cbc7485fbe (patch) | |
tree | ddf51d2cdab17ad9955b371335c367836ed3249d /libavcodec/rv34.c | |
parent | 52dc3600a901d86cb3a4723f108cea04a594443f (diff) | |
parent | fdbd924b84e85ac5c80f01ee059ed5c81d3cc205 (diff) | |
download | ffmpeg-93648ee47b8f70159d5f41b8cebf14cbc7485fbe.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
rv34: Fix a memory leak on errors
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r-- | libavcodec/rv34.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index 9b47d2e9ea..8834032974 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1500,8 +1500,10 @@ av_cold int ff_rv34_decode_init(AVCodecContext *avctx) ff_rv40dsp_init(&r->rdsp); #endif - if ((ret = rv34_decoder_alloc(r)) < 0) + if ((ret = rv34_decoder_alloc(r)) < 0) { + ff_MPV_common_end(&r->s); return ret; + } if(!intra_vlcs[0].cbppattern[0].bits) rv34_init_tables(); @@ -1522,8 +1524,10 @@ int ff_rv34_decode_init_thread_copy(AVCodecContext *avctx) r->tmp_b_block_base = NULL; if ((err = ff_MPV_common_init(&r->s)) < 0) return err; - if ((err = rv34_decoder_alloc(r)) < 0) + if ((err = rv34_decoder_alloc(r)) < 0) { + ff_MPV_common_end(&r->s); return err; + } } return 0; |