From: James Zern Date: Tue, 14 Jun 2011 00:29:49 +0000 (-0700) Subject: fix corrupt frame leak X-Git-Tag: v0.9.7~90 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=532c30c83e429f67eb33b488c0dac38de76adbeb;p=platform%2Fupstream%2Flibvpx.git fix corrupt frame leak If setup_token_decoder reported an internal error the memory allocated there would not be freed in the resulting call to _remove_decompressor. Change-Id: Ib459de222d76b1910d6f449cdcd01663447dbdf6 --- diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c index fec5172..734ab36 100644 --- a/vp8/decoder/decodframe.c +++ b/vp8/decoder/decodframe.c @@ -533,7 +533,10 @@ static void stop_token_decoder(VP8D_COMP *pbi) VP8_COMMON *pc = &pbi->common; if (pc->multi_token_partition != ONE_PARTITION) + { vpx_free(pbi->mbc); + pbi->mbc = NULL; + } } static void init_frame(VP8D_COMP *pbi) diff --git a/vp8/decoder/onyxd_if.c b/vp8/decoder/onyxd_if.c index 23a3c7d..4845cd0 100644 --- a/vp8/decoder/onyxd_if.c +++ b/vp8/decoder/onyxd_if.c @@ -129,6 +129,7 @@ void vp8dx_remove_decompressor(VP8D_PTR ptr) vp8_de_alloc_overlap_lists(pbi); #endif vp8_remove_common(&pbi->common); + vpx_free(pbi->mbc); vpx_free(pbi); }