summaryrefslogtreecommitdiff
path: root/include/linux/tc_act/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorGuangshuo Li <lgs201920130244@gmail.com>2026-03-13 12:06:11 +0800
committerMark Brown <broonie@kernel.org>2026-03-16 00:05:44 +0000
commitfe757092d2329c397ecb32f2bf68a5b1c4bd9193 (patch)
treecdd9f6ef593c7cc2346d0fa2c2e6fdddf83ec599 /include/linux/tc_act/git@git.tavy.me:linux.git
parentf338e77383789c0cae23ca3d48adcc5e9e137e3c (diff)
ASoC: sma1307: fix double free of devm_kzalloc() memory
A previous change added NULL checks and cleanup for allocation failures in sma1307_setting_loaded(). However, the cleanup for mode_set entries is wrong. Those entries are allocated with devm_kzalloc(), so they are device-managed resources and must not be freed with kfree(). Manually freeing them in the error path can lead to a double free when devres later releases the same memory. Drop the manual kfree() loop and let devres handle the cleanup. Fixes: 0ec6bd16705fe ("ASoC: sma1307: Add NULL check in sma1307_setting_loaded()") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Link: https://patch.msgid.link/20260313040611.391479-1-lgs201920130244@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/tc_act/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions