vp9/10 decoder_remove: check pbi pointer

fixes crash on error

Change-Id: Ibb1ef5565fb833cdee1a49335473d98f1187ef43
This commit is contained in:
James Zern 2015-09-24 19:50:42 -07:00
parent ee72b6915e
commit 921c347ef6
2 changed files with 6 additions and 0 deletions

View File

@ -126,6 +126,9 @@ VP10Decoder *vp10_decoder_create(BufferPool *const pool) {
void vp10_decoder_remove(VP10Decoder *pbi) {
int i;
if (!pbi)
return;
vpx_get_worker_interface()->end(&pbi->lf_worker);
vpx_free(pbi->lf_worker.data1);
vpx_free(pbi->tile_data);

View File

@ -126,6 +126,9 @@ VP9Decoder *vp9_decoder_create(BufferPool *const pool) {
void vp9_decoder_remove(VP9Decoder *pbi) {
int i;
if (!pbi)
return;
vpx_get_worker_interface()->end(&pbi->lf_worker);
vpx_free(pbi->lf_worker.data1);
vpx_free(pbi->tile_data);