[CIFS] Missing free in error path
authorSteve French <sfrench@us.ibm.com>
Fri, 2 Feb 2007 14:42:12 +0000 (14:42 +0000)
committerSteve French <sfrench@us.ibm.com>
Fri, 2 Feb 2007 14:42:12 +0000 (14:42 +0000)
Thanks to jra for pointing this out

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/smbdes.c

index 1a4a395..1b1daf6 100644 (file)
@@ -207,8 +207,10 @@ dohash(char *out, char *in, char *key, int forw)
                return;
 
        ki = kmalloc(16*48, GFP_KERNEL);
-       if(ki == NULL)
+       if(ki == NULL) {
+               kfree(pk1);
                return;
+       }
 
        cd = pk1 + 56;
        pd1= cd  + 56;