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]
Date:   Wed, 18 Oct 2017 10:47:29 -0700
From:   Felix Manlunas <felix.manlunas@...ium.com>
To:     "Gustavo A. R. Silva" <garsilva@...eddedor.com>
Cc:     Derek Chickles <derek.chickles@...iumnetworks.com>,
        Satanand Burla <satananda.burla@...iumnetworks.com>,
        Felix Manlunas <felix.manlunas@...iumnetworks.com>,
        Raghu Vatsavayi <raghu.vatsavayi@...iumnetworks.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] liquidio: remove unnecessary NULL check before kfree
 in delete_glists

On Tue, Oct 17, 2017 at 01:59:20PM -0500, Gustavo A. R. Silva wrote:
> NULL check before freeing functions like kfree is not needed.
> 
> This issue was detected with the help of Coccinelle.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@...eddedor.com>
> ---
> This code was tested by compilation only.
> 
>  drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
> index 2e993ce..e4a112c 100644
> --- a/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
> +++ b/drivers/net/ethernet/cavium/liquidio/lio_vf_main.c
> @@ -435,8 +435,7 @@ static void delete_glists(struct lio *lio)
>  		do {
>  			g = (struct octnic_gather *)
>  			    list_delete_head(&lio->glist[i]);
> -			if (g)
> -				kfree(g);
> +			kfree(g);
>  		} while (g);
>  
>  		if (lio->glists_virt_base && lio->glists_virt_base[i] &&
> -- 
> 2.7.4
> 

Acked-by: Felix Manlunas <felix.manlunas@...ium.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ