Skip to content

Commit

Permalink
[PATCH] eCryptfs: Fix pointer deref
Browse files Browse the repository at this point in the history
I missed a pointer dereference in this kmalloc result check.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Michael Halcrow authored and Linus Torvalds committed Nov 3, 2006
1 parent 2de6c39 commit 7bd473f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ecryptfs/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ int ecryptfs_crypto_api_algify_cipher_name(char **algified_name,

algified_name_len = (chaining_modifier_len + cipher_name_len + 3);
(*algified_name) = kmalloc(algified_name_len, GFP_KERNEL);
if (!(algified_name)) {
if (!(*algified_name)) {
rc = -ENOMEM;
goto out;
}
Expand Down

0 comments on commit 7bd473f

Please sign in to comment.