aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/testmgr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index dc3cf3535ef0..75c78e6b1a26 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -414,16 +414,18 @@ static int __test_aead(struct crypto_aead *tfm, int enc,
414 void *input; 414 void *input;
415 void *output; 415 void *output;
416 void *assoc; 416 void *assoc;
417 char iv[MAX_IVLEN]; 417 char *iv;
418 char *xbuf[XBUFSIZE]; 418 char *xbuf[XBUFSIZE];
419 char *xoutbuf[XBUFSIZE]; 419 char *xoutbuf[XBUFSIZE];
420 char *axbuf[XBUFSIZE]; 420 char *axbuf[XBUFSIZE];
421 421
422 iv = kzalloc(MAX_IVLEN, GFP_KERNEL);
423 if (!iv)
424 return ret;
422 if (testmgr_alloc_buf(xbuf)) 425 if (testmgr_alloc_buf(xbuf))
423 goto out_noxbuf; 426 goto out_noxbuf;
424 if (testmgr_alloc_buf(axbuf)) 427 if (testmgr_alloc_buf(axbuf))
425 goto out_noaxbuf; 428 goto out_noaxbuf;
426
427 if (diff_dst && testmgr_alloc_buf(xoutbuf)) 429 if (diff_dst && testmgr_alloc_buf(xoutbuf))
428 goto out_nooutbuf; 430 goto out_nooutbuf;
429 431
@@ -767,6 +769,7 @@ out_nooutbuf:
767out_noaxbuf: 769out_noaxbuf:
768 testmgr_free_buf(xbuf); 770 testmgr_free_buf(xbuf);
769out_noxbuf: 771out_noxbuf:
772 kfree(iv);
770 return ret; 773 return ret;
771} 774}
772 775