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] [day] [month] [year] [list]
Message-ID: <20130212181256.GB7728@boyd>
Date:	Tue, 12 Feb 2013 10:12:56 -0800
From:	Tyler Hicks <tyhicks@...onical.com>
To:	Tim Gardner <tim.gardner@...onical.com>
Cc:	linux-kernel@...r.kernel.org,
	Dustin Kirkland <dustin.kirkland@...zang.com>,
	ecryptfs@...r.kernel.org
Subject: Re: [PATCH linux-next] ecryptfs: ecryptfs_msg_ctx_alloc_to_free():
 remove kfree() redundant null check

On 2013-02-12 11:03:49, Tim Gardner wrote:
> smatch analysis:
> 
> fs/ecryptfs/messaging.c:101 ecryptfs_msg_ctx_alloc_to_free() info:
>  redundant null check on msg_ctx->msg calling kfree()
> 
> Cc: Tyler Hicks <tyhicks@...onical.com>
> Cc: Dustin Kirkland <dustin.kirkland@...zang.com>
> Cc: ecryptfs@...r.kernel.org
> Signed-off-by: Tim Gardner <tim.gardner@...onical.com>

Thanks, Tim. Pushed to the next branch at
git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs.git

Tyler

> ---
>  fs/ecryptfs/messaging.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c
> index 8d7a577..308fdf2 100644
> --- a/fs/ecryptfs/messaging.c
> +++ b/fs/ecryptfs/messaging.c
> @@ -97,8 +97,7 @@ static void ecryptfs_msg_ctx_free_to_alloc(struct ecryptfs_msg_ctx *msg_ctx)
>  void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx)
>  {
>  	list_move(&(msg_ctx->node), &ecryptfs_msg_ctx_free_list);
> -	if (msg_ctx->msg)
> -		kfree(msg_ctx->msg);
> +	kfree(msg_ctx->msg);
>  	msg_ctx->msg = NULL;
>  	msg_ctx->state = ECRYPTFS_MSG_CTX_STATE_FREE;
>  }
> -- 
> 1.7.9.5
> 

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ