From: Shengjiu Wang Date: Wed, 12 May 2021 10:04:39 +0000 (+0800) Subject: LF-3548-2: ASoC: fsl_easrc_m2m: Fix issue with double kfree X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~87 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=58f410ca4eab3ffac0a4645b5c48e756d2e98f09;p=linux.git LF-3548-2: ASoC: fsl_easrc_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 --- diff --git a/sound/soc/fsl/fsl_easrc_m2m.c b/sound/soc/fsl/fsl_easrc_m2m.c index 8ccdbaf5650e..7a5d6a18dce7 100755 --- a/sound/soc/fsl/fsl_easrc_m2m.c +++ b/sound/soc/fsl/fsl_easrc_m2m.c @@ -67,7 +67,7 @@ static int fsl_allocate_dma_buf(struct fsl_easrc_m2m *m2m) alloc_fail: kfree(input->dma_vaddr); - + input->dma_vaddr = NULL; return -ENOMEM; }