From 83f60ad655bb9153183e14d98215c295da5d0f97 Mon Sep 17 00:00:00 2001 From: Nanxin Qin Date: Thu, 7 Sep 2017 00:39:08 +0800 Subject: [PATCH] decoder: fixed the issure of mem to avoid leak. PD#150221: fixed the issure of mem to avoid leak. Change-Id: Id1ef51e30cfab718e5e57881af5d84eb2609d1b1 Signed-off-by: Nanxin Qin --- .../media_modules/frame_provider/decoder/h265/vh265.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c b/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c index 36881860cbfd..025af9070c86 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/h265/vh265.c @@ -8735,9 +8735,6 @@ static int vh265_stop(struct hevc_state_s *hevc) uninit_mmu_buffers(hevc); amhevc_disable(); - vfree(hevc->fw); - hevc->fw = NULL; - kfree(gvs); gvs = NULL; @@ -8852,6 +8849,10 @@ static int vmh265_stop(struct hevc_state_s *hevc) cancel_work_sync(&hevc->work); cancel_work_sync(&hevc->notify_work); uninit_mmu_buffers(hevc); + + vfree(hevc->fw); + hevc->fw = NULL; + dump_log(hevc); return 0; }