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: <20210829171351.u63zoaqa3x5qfodt@kari-VirtualBox>
Date:   Sun, 29 Aug 2021 20:13:51 +0300
From:   Kari Argillander <kari.argillander@...il.com>
To:     Saurav Girepunje <saurav.girepunje@...il.com>
Cc:     Larry.Finger@...inger.net, phil@...lpotter.co.uk,
        gregkh@...uxfoundation.org, fabioaiuto83@...il.com,
        straube.linux@...il.com, ross.schm.dev@...il.com,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        saurav.girepunje@...mail.com
Subject: Re: [PATCH v4] staging: r8188eu: core: remove null check before vfree

On Sun, Aug 29, 2021 at 10:30:09PM +0530, Saurav Girepunje wrote:
> Remove NULL check. NULL check before freeing function is not needed.
> Correct the indentation.
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@...il.com>
> ---
> 
> ChangeLog V4:
> - Add Change log below --- line
> 
> ChangeLog V3:
> - Add change log.
> 
> ChangeLog V2:
> - Correct the indentation.

You need "---" here also. So everything what is between

---
here
---

will be ignored when you apply patch. This is good place to write
changelog, if you have tested this with real hardware, if you have any
guestions about your own implementation etc.

> 
>  drivers/staging/r8188eu/core/rtw_sta_mgt.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c
> index f6dffed53a60..c3600cb1790a 100644
> --- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c
> +++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c
> @@ -155,9 +155,8 @@ u32	_rtw_free_sta_priv(struct	sta_priv *pstapriv)
>  		spin_unlock_bh(&pstapriv->sta_hash_lock);
>  		/*===============================*/
> 
> -		if (pstapriv->pallocated_stainfo_buf)
> -			vfree(pstapriv->pallocated_stainfo_buf);
> -		}
> +		vfree(pstapriv->pallocated_stainfo_buf);
> +	}
> 
>  	return _SUCCESS;
>  }
> --
> 2.32.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ