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:   Fri, 11 Feb 2022 21:30:11 +0300
From:   Maxim Petrov <mmrmaximuzz@...il.com>
To:     stephen@...workplumber.org
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH iproute2] libnetlink: fix socket leak in
 rtnl_open_byproto()

Hello Stephen!

On 2022-02-11 01:19 UTC, Stephen Hemminger wrote:
> +	} else {
> +		rth->seq = time(NULL);
> +		return 0;
>  	}

For me it looks slightly alien as the normal flow jumps from one 'else if' to
another, and the final return statement is hidden inside the else block. The
original version is straightforward and less surprising.

> Can do the same thing without introducing a goto
But what's wrong with the goto here? I thought it is a perfectly legal C way to
handle errors, and iproute2 uses it for that purpose almost everywhere.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ