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:	Sat, 31 Jan 2015 13:38:53 -0500
From:	Neil Horman <nhorman@...driver.com>
To:	SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Vlad Yasevich <vyasevich@...il.com>,
	linux-sctp@...r.kernel.org, netdev@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH] net: sctp: Deletion of an unnecessary check before the
 function call "kfree"

On Sat, Jan 31, 2015 at 06:15:59PM +0100, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Sat, 31 Jan 2015 18:10:03 +0100
> 
> The kfree() function tests whether its argument is NULL and then
> returns immediately. Thus the test around the call is not needed.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
>  net/sctp/associola.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/net/sctp/associola.c b/net/sctp/associola.c
> index f791edd..3c2aefc 100644
> --- a/net/sctp/associola.c
> +++ b/net/sctp/associola.c
> @@ -391,8 +391,7 @@ void sctp_association_free(struct sctp_association *asoc)
>  	sctp_asconf_queue_teardown(asoc);
>  
>  	/* Free pending address space being deleted */
> -	if (asoc->asconf_addr_del_pending != NULL)
> -		kfree(asoc->asconf_addr_del_pending);
> +	kfree(asoc->asconf_addr_del_pending);
>  
>  	/* AUTH - Free the endpoint shared keys */
>  	sctp_auth_destroy_keys(&asoc->endpoint_shared_keys);
> -- 
> 2.2.2
> 
> 
Sure, seems reasonable
Acked-By: Neil Horman <nhorman@...driver.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ