Commit 532c30c8 authored by James Zern's avatar James Zern
Browse files

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
Showing with 4 additions and 0 deletions
......@@ -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)
......
......@@ -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);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment