mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-11 11:55:28 +02:00
HID: logitech-dj: Fix memory leak in logi_dj_recv_switch_to_dj_mode()
[ Upstream commitce3af2ee95
] Fix a memory leak on logi_dj_recv_send_report() error path. Fixes:6f20d32612
("HID: logitech-dj: Fix error handling in logi_dj_recv_switch_to_dj_mode()") Signed-off-by: José Expósito <jose.exposito89@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
1bbadf953f
commit
f677ca8cfe
|
@ -1284,9 +1284,11 @@ static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev,
|
||||||
*/
|
*/
|
||||||
msleep(50);
|
msleep(50);
|
||||||
|
|
||||||
if (retval)
|
if (retval) {
|
||||||
|
kfree(dj_report);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Magical bits to set up hidpp notifications when the dj devices
|
* Magical bits to set up hidpp notifications when the dj devices
|
||||||
|
|
Loading…
Reference in New Issue
Block a user