]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
i3c: master: renesas: Fix memory leak in renesas_i3c_i3c_xfers()
authorFelix Gu <ustc.gu@gmail.com>
Mon, 6 Apr 2026 12:43:16 +0000 (20:43 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 12 Apr 2026 14:47:13 +0000 (16:47 +0200)
commitd7665c3b4f575251e449e2656879392346ca612b
tree8cf4d7f23b79c2339e8ed6918fcc2866fc5aaa57
parent19d6dd322c3f05550606dbfcbafb5f6989975c02
i3c: master: renesas: Fix memory leak in renesas_i3c_i3c_xfers()

The xfer structure allocated by renesas_i3c_alloc_xfer() was never freed
in the renesas_i3c_i3c_xfers() function. Use the __free(kfree) cleanup
attribute to automatically free the memory when the variable goes out of
scope.

Fixes: d028219a9f14 ("i3c: master: Add basic driver for the Renesas I3C controller")
Tested-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260406-renesas-v3-1-4b724d7708f4@gmail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master/renesas-i3c.c