* [PATCH -next] ASoC: Intel: sst_byt: remove kfree for memory allocated with devm_kzalloc
@ 2015-04-16 13:46 weiyj_lk
2015-04-16 14:05 ` Jarkko Nikula
2015-04-17 13:32 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: weiyj_lk @ 2015-04-16 13:46 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai, Jin Yao,
Jarkko Nikula, Jie Yang, Andy Shevchenko
Cc: Wei Yongjun, alsa-devel, linux-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
It's not necessary to free memory allocated with devm_kzalloc
and using kfree leads to a double free.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
sound/soc/intel/baytrail/sst-baytrail-ipc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/intel/baytrail/sst-baytrail-ipc.c b/sound/soc/intel/baytrail/sst-baytrail-ipc.c
index 1efb33b..a839dbf 100644
--- a/sound/soc/intel/baytrail/sst-baytrail-ipc.c
+++ b/sound/soc/intel/baytrail/sst-baytrail-ipc.c
@@ -759,7 +759,6 @@ fw_err:
dsp_new_err:
sst_ipc_fini(ipc);
ipc_init_err:
- kfree(byt);
return err;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] ASoC: Intel: sst_byt: remove kfree for memory allocated with devm_kzalloc
2015-04-16 13:46 [PATCH -next] ASoC: Intel: sst_byt: remove kfree for memory allocated with devm_kzalloc weiyj_lk
@ 2015-04-16 14:05 ` Jarkko Nikula
2015-04-17 13:32 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Jarkko Nikula @ 2015-04-16 14:05 UTC (permalink / raw)
To: weiyj_lk, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai, Jin Yao, Jie Yang, Andy Shevchenko
Cc: Wei Yongjun, alsa-devel, linux-kernel
Hi
On 04/16/2015 04:46 PM, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> It's not necessary to free memory allocated with devm_kzalloc
> and using kfree leads to a double free.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> sound/soc/intel/baytrail/sst-baytrail-ipc.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/sound/soc/intel/baytrail/sst-baytrail-ipc.c b/sound/soc/intel/baytrail/sst-baytrail-ipc.c
> index 1efb33b..a839dbf 100644
> --- a/sound/soc/intel/baytrail/sst-baytrail-ipc.c
> +++ b/sound/soc/intel/baytrail/sst-baytrail-ipc.c
> @@ -759,7 +759,6 @@ fw_err:
> dsp_new_err:
> sst_ipc_fini(ipc);
> ipc_init_err:
> - kfree(byt);
>
> return err;
> }
>
Above kfree(byt) appears to be added by accident in the commit
48cec59b6f38 ("ASoC: Intel: Use the generic IPC/mailbox APIs in Baytrail").
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH -next] ASoC: Intel: sst_byt: remove kfree for memory allocated with devm_kzalloc
2015-04-16 13:46 [PATCH -next] ASoC: Intel: sst_byt: remove kfree for memory allocated with devm_kzalloc weiyj_lk
2015-04-16 14:05 ` Jarkko Nikula
@ 2015-04-17 13:32 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2015-04-17 13:32 UTC (permalink / raw)
To: weiyj_lk
Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Jin Yao,
Jarkko Nikula, Jie Yang, Andy Shevchenko, Wei Yongjun, alsa-devel,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 252 bytes --]
On Thu, Apr 16, 2015 at 09:46:29PM +0800, weiyj_lk@163.com wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> It's not necessary to free memory allocated with devm_kzalloc
> and using kfree leads to a double free.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-04-17 13:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-16 13:46 [PATCH -next] ASoC: Intel: sst_byt: remove kfree for memory allocated with devm_kzalloc weiyj_lk
2015-04-16 14:05 ` Jarkko Nikula
2015-04-17 13:32 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox