[PATCH v2] soc: mediatek: svs: Fix memory leak in svs_enable_debug_write()

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Thu Jan 8 01:16:59 PST 2026


On Sun, 28 Dec 2025 16:26:36 +0000, Zilin Guan wrote:
> In svs_enable_debug_write(), the buf allocated by memdup_user_nul()
> is leaked if kstrtoint() fails.
> 
> Fix this by using __free(kfree) to automatically free buf, eliminating
> the need for explicit kfree() calls and preventing leaks.
> 
> 
> [...]

Applied to v6.19-next/soc, thanks!

[1/1] soc: mediatek: svs: Fix memory leak in svs_enable_debug_write()
      commit: ebede2ddeb047bdf7ee660a18403592c45d020d9

Cheers,
Angelo





More information about the Linux-mediatek mailing list