diff options
Diffstat (limited to 'fs/cifs/smbdes.c')
-rw-r--r-- | fs/cifs/smbdes.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/cifs/smbdes.c b/fs/cifs/smbdes.c index 7a1b2b961ec8..1b1daf63f062 100644 --- a/fs/cifs/smbdes.c +++ b/fs/cifs/smbdes.c | |||
@@ -196,7 +196,7 @@ dohash(char *out, char *in, char *key, int forw) | |||
196 | char c[28]; | 196 | char c[28]; |
197 | char d[28]; | 197 | char d[28]; |
198 | char *cd; | 198 | char *cd; |
199 | char ki[16][48]; | 199 | char (*ki)[48]; |
200 | char *pd1; | 200 | char *pd1; |
201 | char l[32], r[32]; | 201 | char l[32], r[32]; |
202 | char *rl; | 202 | char *rl; |
@@ -206,6 +206,12 @@ dohash(char *out, char *in, char *key, int forw) | |||
206 | if(pk1 == NULL) | 206 | if(pk1 == NULL) |
207 | return; | 207 | return; |
208 | 208 | ||
209 | ki = kmalloc(16*48, GFP_KERNEL); | ||
210 | if(ki == NULL) { | ||
211 | kfree(pk1); | ||
212 | return; | ||
213 | } | ||
214 | |||
209 | cd = pk1 + 56; | 215 | cd = pk1 + 56; |
210 | pd1= cd + 56; | 216 | pd1= cd + 56; |
211 | rl = pd1 + 64; | 217 | rl = pd1 + 64; |
@@ -243,6 +249,7 @@ dohash(char *out, char *in, char *key, int forw) | |||
243 | er = kmalloc(48+48+32+32+32, GFP_KERNEL); | 249 | er = kmalloc(48+48+32+32+32, GFP_KERNEL); |
244 | if(er == NULL) { | 250 | if(er == NULL) { |
245 | kfree(pk1); | 251 | kfree(pk1); |
252 | kfree(ki); | ||
246 | return; | 253 | return; |
247 | } | 254 | } |
248 | erk = er+48; | 255 | erk = er+48; |
@@ -290,6 +297,7 @@ dohash(char *out, char *in, char *key, int forw) | |||
290 | 297 | ||
291 | permute(out, rl, perm6, 64); | 298 | permute(out, rl, perm6, 64); |
292 | kfree(pk1); | 299 | kfree(pk1); |
300 | kfree(ki); | ||
293 | } | 301 | } |
294 | 302 | ||
295 | static void | 303 | static void |