ASoC: SOF: icp3-dtrace: Revert "Fix wrong kfree() usage"
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Fri, 12 Jan 2024 13:27:49 +0000 (15:27 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 12 Jan 2024 14:13:52 +0000 (14:13 +0000)
commit813c2f2925ee9c10dc4acd5aa7410cd3357e8da8
tree1eb8ab66a644c8dbbacccfb4fe20ca7fc5817cd6
parente3b3ec967a7d93b9010a5af9a2394c8b5c8f31ed
ASoC: SOF: icp3-dtrace: Revert "Fix wrong kfree() usage"

The offending patch introduces memory leak when there is no error, the
memory allocated for the temporary storage is not freed up.

As I have commented, the original code was correct and cleaner to
follow but it was not obvious from the patch that it will introduce
regression.

Fixes: 8c91ca76f448 ("ASoC: SOF: icp3-dtrace: Fix wrong kfree() usage")
Link: https://lore.kernel.org/all/aec61f67-6b4f-49e6-b458-c332983a0ad6@linux.intel.com/
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://msgid.link/r/20240112132749.28970-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc3-dtrace.c