summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smbdes.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-06 14:42:20 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-06 14:42:20 -0800
commit768c242b30d9ec5581dd245e8289acb6b77815d1 (patch)
tree72a3563dd084e02e9a7b151e2cf9461dd3782913 /fs/cifs/smbdes.c
parente503606c5b7687842beb8fca46b827606ae40c63 (diff)
parenta850790f6c903f1a89d0dbf953946d231df3fe6b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: [CIFS] Minor cleanup [CIFS] Missing free in error path [CIFS] Reduce cifs stack space usage [CIFS] lseek polling returned stale EOF
Diffstat (limited to 'fs/cifs/smbdes.c')
-rw-r--r--fs/cifs/smbdes.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/cifs/smbdes.c b/fs/cifs/smbdes.c
index 7a1b2b961ec..1b1daf63f06 100644
--- a/fs/cifs/smbdes.c
+++ b/fs/cifs/smbdes.c
@@ -196,7 +196,7 @@ dohash(char *out, char *in, char *key, int forw)
char c[28];
char d[28];
char *cd;
- char ki[16][48];
+ char (*ki)[48];
char *pd1;
char l[32], r[32];
char *rl;
@@ -206,6 +206,12 @@ dohash(char *out, char *in, char *key, int forw)
if(pk1 == NULL)
return;
+ ki = kmalloc(16*48, GFP_KERNEL);
+ if(ki == NULL) {
+ kfree(pk1);
+ return;
+ }
+
cd = pk1 + 56;
pd1= cd + 56;
rl = pd1 + 64;
@@ -243,6 +249,7 @@ dohash(char *out, char *in, char *key, int forw)
er = kmalloc(48+48+32+32+32, GFP_KERNEL);
if(er == NULL) {
kfree(pk1);
+ kfree(ki);
return;
}
erk = er+48;
@@ -290,6 +297,7 @@ dohash(char *out, char *in, char *key, int forw)
permute(out, rl, perm6, 64);
kfree(pk1);
+ kfree(ki);
}
static void