Re: [PATCH] [v2] HID: elan: Fix memleak in elan_input_configured

From: Jiri Kosina
Date: Tue Sep 01 2020 - 03:13:33 EST


On Mon, 31 Aug 2020, Dinghao Liu wrote:

> When input_mt_init_slots() fails, input should be freed
> to prevent memleak. When input_register_device() fails,
> we should call input_mt_destroy_slots() to free memory
> allocated by input_mt_init_slots().
>
> Signed-off-by: Dinghao Liu <dinghao.liu@xxxxxxxxxx>
> ---
>
> Changelog:
>
> v2: - Add input_mt_destroy_slots() on failure of
> input_register_device().

Thanks, applied.

--
Jiri Kosina
SUSE Labs