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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YUW12SAg7I2cmzVY@kroah.com>
Date:   Sat, 18 Sep 2021 11:48:09 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Cc:     Larry.Finger@...inger.net, phil@...lpotter.co.uk,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: r8188eu: Remove unneeded if-null-free check

On Sat, Sep 18, 2021 at 05:10:06PM +0800, Jiapeng Chong wrote:
> Eliminate the following coccicheck warning:
> 
> ./drivers/staging/r8188eu/os_dep/usb_intf.c:545:3-8: WARNING: NULL check
> before some freeing functions is not needed.
> 
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Fixes: 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
> ---
>  drivers/staging/r8188eu/os_dep/usb_intf.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
> index d04d2f65..7e42a0a 100644
> --- a/drivers/staging/r8188eu/os_dep/usb_intf.c
> +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
> @@ -541,9 +541,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
>  	if (status != _SUCCESS) {
>  		if (pnetdev)
>  			rtw_free_netdev(pnetdev);
> -		else if (padapter)
> -			vfree(padapter);
> -		padapter = NULL;
> +		vfree(padapter);
>  	}
>  exit:
>  	return padapter;
> -- 
> 1.8.3.1
> 

You just changed how this function works. :(

Please be MUCH more careful, and fix your robot.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ