From 93af3e73d14b0c0930ba95626cb74d765907d127 Mon Sep 17 00:00:00 2001 From: "apollo.ling" Date: Fri, 18 Sep 2020 15:40:15 +0800 Subject: [PATCH] vdec: avoid free block when block is in free list [1/1] PD#SWPL-33580 Problem: When mem block is in free list, the mem block is freed Solution: Avoid free mem block when block is in free list Verify: u212 Change-Id: I7884c78c2fbd7db826eda94419569b5873c5d14e Signed-off-by: apollo.ling --- drivers/frame_provider/decoder/utils/vdec_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/frame_provider/decoder/utils/vdec_input.c b/drivers/frame_provider/decoder/utils/vdec_input.c index 481edd7..4eed7dc 100644 --- a/drivers/frame_provider/decoder/utils/vdec_input.c +++ b/drivers/frame_provider/decoder/utils/vdec_input.c @@ -1071,8 +1071,8 @@ void vdec_input_release_chunk(struct vdec_input_s *input, if (block->free) { vdec_input_del_block_locked(input, block); block->free(block->priv, block->handle); + kfree(block); } - kfree(block); } else if (block->chunk_count == 0 && input->wr_block != block ) {/*don't free used block*/ if (block->size < input->default_block_size) { -- 2.20.1