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] [thread-next>] [day] [month] [year] [list]
Date: Tue, 14 Nov 2023 16:36:17 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: heminhong <heminhong@...inos.cn>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] iproute2: prevent memory leak

On Tue, 14 Nov 2023 17:24:10 +0800
heminhong <heminhong@...inos.cn> wrote:

> +			if (NULL != answer)
> +			{
> +				free(answer);
> +			}

Four style problems here:
	1. Don't use Windows convention of NULL first
	2. Don't use Windows style bracket indentation
	3. Brackets are not used in kernel style for single statment if()
	4. Since free of NULL is a perfectly valid nop. Just call free() and skip the if.

If you read the existing code, you would see that it uses kernel style.
Any change should follow the conventions of existing code.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ