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: <20191025024216.GB331827@kroah.com>
Date:   Thu, 24 Oct 2019 22:42:16 -0400
From:   Greg KH <gregkh@...uxfoundation.org>
To:     zhong jiang <zhongjiang@...wei.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: remove an redundant null check
 before kfree()

On Wed, Oct 16, 2019 at 03:38:26PM +0800, zhong jiang wrote:
> kfree() has taken null pointer into account. hence it is safe to remove
> the unnecessary check.
> 
> Signed-off-by: zhong jiang <zhongjiang@...wei.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> index 7011c2a..4597f4f 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> @@ -2210,8 +2210,7 @@ void rtw_free_hwxmits(struct adapter *padapter)
>  	struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
>  
>  	hwxmits = pxmitpriv->hwxmits;
> -	if (hwxmits)
> -		kfree(hwxmits);
> +	kfree(hwxmits);
>  }
>  
>  void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry)
> -- 
> 1.7.12.4
> 

Patch does not apply to my tree :(

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ