]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] eCryptfs: Fix pointer deref
authorMichael Halcrow <mhalcrow@us.ibm.com>
Fri, 3 Nov 2006 06:06:56 +0000 (22:06 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 3 Nov 2006 20:27:55 +0000 (12:27 -0800)
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>
fs/ecryptfs/crypto.c

index f49f105394b70a91268a7ed63d56544aeff10fba..136175a693321300743e02a7dd1f663e3ff41c4d 100644 (file)
@@ -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;
        }