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]
Date:   Mon, 10 Sep 2018 21:54:36 +0800
From:   zhong jiang <zhongjiang@...wei.com>
To:     Johannes Berg <johannes@...solutions.net>
CC:     <davem@...emloft.net>, <linux-wireless@...r.kernel.org>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] wireless: remove unnecessary condition check before kfree

On 2018/9/10 15:10, Johannes Berg wrote:
> On Sat, 2018-09-08 at 22:12 +0800, zhong jiang wrote:
>> kfree has taken the null pointer into account. Just remove the
>> redundant condition check before kfree.
> I'm all for doing that if it actually removes conditionals, but
>
>> -	if (!IS_ERR_OR_NULL(regdb))
>> +	if (!IS_ERR(regdb))
>>  		kfree(regdb);
> this seems rather pointless since there's still a condition. In that
> case, I feel it's easier to understand the original code.
 Fine, make sense you have said. I just consider the duplication of function.
 
 Thanks,
 zhong jiang
> johannes
>
> .
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ