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: <m1tym0vkyb.fsf@fess.ebiederm.org>
Date:	Tue, 07 Sep 2010 22:54:52 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	jovi zhang <bookjovi@...il.com>
Cc:	Eric Dumazet <eric.dumazet@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Johannes Berg <johannes.berg@...el.com>,
	Alexey Dobriyan <adobriyan@...nvz.org>,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] netlink: Fix kfree NULL pointer

jovi zhang <bookjovi@...il.com> writes:

> On Wed, Sep 8, 2010 at 1:19 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
>>
>>
>> This patch is not needed
>>
>> kfree(NULL) is legal
>>
>>
>>
>>
>
> YES, maybe kfree(NULL) is legal, but I cannot see there have any need
> to invoke kfree(NULL) in this function.
>  Also I check kfree usage in other code, I havn't find any kfree(NULL)
> usage.

Usually kfree(NULL) is not explicit, but "var = NULL; kfree(var)" is
common in error handling paths to reduce the complexity of error
handling, making bugs less likely.


Eric

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ