From b710498a5db53199bd3bf121b9f8cb1c36b774c3 Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Wed, 12 May 2021 17:59:50 +0800 Subject: [PATCH] LF-3548-1: ASoC: fsl_asrc_m2m: Fix issue with double kfree The pointer need to be NULL after kfree to avoid kernel dummp in second kfree for same pointer. [ 9285.401707] Call trace: [ 9285.404171] kfree+0x388/0x3fc [ 9285.407238] fsl_easrc_ioctl+0xf4/0xf80 Signed-off-by: Shengjiu Wang Reviewed-by: Peng Zhang --- sound/soc/fsl/fsl_asrc_m2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_asrc_m2m.c b/sound/soc/fsl/fsl_asrc_m2m.c index 411f132c4b7d..26f639678f8f 100644 --- a/sound/soc/fsl/fsl_asrc_m2m.c +++ b/sound/soc/fsl/fsl_asrc_m2m.c @@ -151,7 +151,7 @@ static int fsl_allocate_dma_buf(struct fsl_asrc_pair *pair) exit: kfree(input->dma_vaddr); - + input->dma_vaddr = NULL; return -ENOMEM; } -- 2.17.1