[hal_h264e_rkv]: Fix memory leak

Call function mpp_linreg_deinit to release the buffer malloced
by mpp_linreg_init.

Change-Id: I3ac51478da56cb03b36154a055d0617d783d2936
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
This commit is contained in:
Lin Kesheng
2017-02-10 10:08:06 +08:00
parent d88b087526
commit eee502c5ae

View File

@@ -2191,6 +2191,16 @@ MPP_RET hal_h264e_rkv_deinit(void *hal)
ctx->qp_p = NULL;
}
if (ctx->intra_qs) {
mpp_linreg_deinit(ctx->intra_qs);
ctx->intra_qs = NULL;
}
if (ctx->inter_qs) {
mpp_linreg_deinit(ctx->inter_qs);
ctx->inter_qs = NULL;
}
#ifdef RKPLATFORM
if (ctx->vpu_fd <= 0) {
h264e_hal_log_err("invalid vpu socket: %d", ctx->vpu_fd);