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: <20251229151623.466713-1-zilin@seu.edu.cn>
Date: Mon, 29 Dec 2025 15:16:23 +0000
From: Zilin Guan <zilin@....edu.cn>
To: dpenkler@...il.com
Cc: gregkh@...uxfoundation.org,
	jianhao.xu@....edu.cn,
	linux-kernel@...r.kernel.org,
	matchstick@...erthere.org,
	mingo@...nel.org,
	tglx@...utronix.de,
	zilin@....edu.cn
Subject: Re: [PATCH] staging: gpib: Fix memory leak in ni_usb_init()

On Mon, Dec 29, 2025 at 01:19:22PM+0100, Dave Penkler wrote:
> Good catch.
> Prefer simpler variant with check for failure first:
>   	if (!writes_len) {
> 		kfree(writes);
> 		return -EFAULT;
> 	}
>   	retval = ni_usb_write_registers(ni_priv, writes, writes_len, &ibsta);
>   	kfree(writes);
> 	if (retval) {
> 	...
> cheers,
> -Dave

Thanks for the review and the suggestion. I will adopt this approach in v2.

Regards,
Zilin Guan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ