lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <nycvar.YFH.7.76.2406041016330.16865@cbobk.fhfr.pm>
Date: Tue, 4 Jun 2024 10:16:41 +0200 (CEST)
From: Jiri Kosina <jikos@...nel.org>
To: José Expósito <jose.exposito89@...il.com>
cc: bentiss@...nel.org, lains@...eup.net, linux-input@...r.kernel.org, 
    linux-kernel@...r.kernel.org
Subject: Re: [PATCH] HID: logitech-dj: Fix memory leak in
 logi_dj_recv_switch_to_dj_mode()

On Fri, 24 May 2024, José Expósito wrote:

> Fix a memory leak on logi_dj_recv_send_report() error path.
> 
> Fixes: 6f20d3261265 ("HID: logitech-dj: Fix error handling in logi_dj_recv_switch_to_dj_mode()")
> Signed-off-by: José Expósito <jose.exposito89@...il.com>
> ---
>  drivers/hid/hid-logitech-dj.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
> index 3c3c497b6b91..37958edec55f 100644
> --- a/drivers/hid/hid-logitech-dj.c
> +++ b/drivers/hid/hid-logitech-dj.c
> @@ -1284,8 +1284,10 @@ static int logi_dj_recv_switch_to_dj_mode(struct dj_receiver_dev *djrcv_dev,
>  		 */
>  		msleep(50);
>  
> -		if (retval)
> +		if (retval) {
> +			kfree(dj_report);
>  			return retval;
> +		}
>  	}

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ