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]
Message-ID: <20161027125441.GE3175@twins.programming.kicks-ass.net>
Date:   Thu, 27 Oct 2016 14:54:41 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     David Herrmann <dh.herrmann@...il.com>
Cc:     linux-kernel@...r.kernel.org,
        Andy Lutomirski <luto@...capital.net>,
        Jiri Kosina <jikos@...nel.org>, Greg KH <greg@...ah.com>,
        Hannes Reinecke <hare@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Arnd Bergmann <arnd@...db.de>, Tom Gundersen <teg@...m.no>,
        Josh Triplett <josh@...htriplett.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [RFC v1 05/14] bus1: util - pool utility library

On Wed, Oct 26, 2016 at 09:18:01PM +0200, David Herrmann wrote:
> +static struct bus1_pool_slice *
> +bus1_pool_slice_free(struct bus1_pool_slice *slice)
> +{
> +	if (!slice)
> +		return NULL;
> +
> +	kfree(slice);
> +
> +	return NULL;
> +}

The return value is never used. Which reduces the entire thing to:

	kfree(slice);

since kfree() already accepts a NULL.

> +		bus1_pool_slice_free(slice);
> +			bus1_pool_slice_free(slice);
> +			bus1_pool_slice_free(ps);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ