[vp8e]: fix double-free when deinit vp8e

The ctx should be freed in enc_impl_deinit().

Change-Id: I65bac3a0211f7e470f625fcf5d2b9c1efde1d1c6
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
Jeffy Chen
2020-04-07 15:30:48 +08:00
committed by Herman Chen
parent 681599f97f
commit fd14525a52

View File

@@ -129,11 +129,9 @@ MPP_RET vp8e_deinit(void *ctx)
Vp8eCtx *p = (Vp8eCtx *)ctx;
vp8e_rc_dbg_func("enter\n");
if (p) {
if (p->rc)
mpp_free(p->rc);
mpp_free(p);
}
if (p->rc)
mpp_free(p->rc);
vp8e_rc_dbg_func("leave\n");
return MPP_OK;