]> git.ipfire.org Git - thirdparty/linux.git/commit
Input: rmi4 - fix memory leak in rmi_set_attn_data()
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 5 May 2026 04:59:35 +0000 (21:59 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 12 Jun 2026 05:39:27 +0000 (22:39 -0700)
commita55a683a8e2bddb5467baab3e597a93022d4ee05
tree2b5f9d2a154a6445d718664cd25c2c9d7d1bc86a
parent6e752b35b65228a948fc9e7dea51abb70da8b114
Input: rmi4 - fix memory leak in rmi_set_attn_data()

kfifo_put() returns 0 if the FIFO is full. In this case, we must
free the memory allocated for the attention data to avoid a leak.

Fixes: b908d3cd812a ("Input: synaptics-rmi4 - allow to add attention data")
Cc: stable@vger.kernel.org
Assisted-by: Gemini:gemini-3.1-pro
Link: https://patch.msgid.link/20260505045952.1570713-5-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/rmi4/rmi_driver.c