public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] eCryptfs: decrypt_pki_encrypted_session_key(): remove kfree() redundant null check
@ 2013-02-12 17:56 Tim Gardner
  2013-02-12 18:12 ` Tyler Hicks
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Gardner @ 2013-02-12 17:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: Tim Gardner, Tyler Hicks, Dustin Kirkland, ecryptfs

smatch analysis:

fs/ecryptfs/keystore.c:1206 decrypt_pki_encrypted_session_key() info:
 redundant null check on msg calling kfree()

Cc: Tyler Hicks <tyhicks@canonical.com>
Cc: Dustin Kirkland <dustin.kirkland@gazzang.com>
Cc: ecryptfs@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 fs/ecryptfs/keystore.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
index 6154cde..5aceff2 100644
--- a/fs/ecryptfs/keystore.c
+++ b/fs/ecryptfs/keystore.c
@@ -1202,8 +1202,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
 				  crypt_stat->key_size);
 	}
 out:
-	if (msg)
-		kfree(msg);
+	kfree(msg);
 	return rc;
 }
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH linux-next] eCryptfs: decrypt_pki_encrypted_session_key(): remove kfree() redundant null check
  2013-02-12 17:56 [PATCH linux-next] eCryptfs: decrypt_pki_encrypted_session_key(): remove kfree() redundant null check Tim Gardner
@ 2013-02-12 18:12 ` Tyler Hicks
  0 siblings, 0 replies; 2+ messages in thread
From: Tyler Hicks @ 2013-02-12 18:12 UTC (permalink / raw)
  To: Tim Gardner; +Cc: linux-kernel, Dustin Kirkland, ecryptfs

[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]

On 2013-02-12 10:56:54, Tim Gardner wrote:
> smatch analysis:
> 
> fs/ecryptfs/keystore.c:1206 decrypt_pki_encrypted_session_key() info:
>  redundant null check on msg calling kfree()
> 
> Cc: Tyler Hicks <tyhicks@canonical.com>
> Cc: Dustin Kirkland <dustin.kirkland@gazzang.com>
> Cc: ecryptfs@vger.kernel.org
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

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

Tyler

> ---
>  fs/ecryptfs/keystore.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
> index 6154cde..5aceff2 100644
> --- a/fs/ecryptfs/keystore.c
> +++ b/fs/ecryptfs/keystore.c
> @@ -1202,8 +1202,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
>  				  crypt_stat->key_size);
>  	}
>  out:
> -	if (msg)
> -		kfree(msg);
> +	kfree(msg);
>  	return rc;
>  }
>  
> -- 
> 1.7.9.5
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-12 18:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-12 17:56 [PATCH linux-next] eCryptfs: decrypt_pki_encrypted_session_key(): remove kfree() redundant null check Tim Gardner
2013-02-12 18:12 ` Tyler Hicks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox