From 619da468b62aed1c15fd81a4f630bcbb7c12dd7d Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Tue, 20 Jul 2010 02:27:57 +0200 Subject: Fix error handling in cryptodev_hash_init --- cryptodev_cipher.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cryptodev_cipher.c b/cryptodev_cipher.c index 05e6db3..fa5aab2 100644 --- a/cryptodev_cipher.c +++ b/cryptodev_cipher.c @@ -262,12 +262,14 @@ int ret; if (unlikely(ret)) { dprintk(0,KERN_ERR, "error in crypto_hash_init()\n"); - goto error; + goto error_request; } hdata->init = 1; return 0; +error_request: + ahash_request_free(hdata->async.request); error: kfree(hdata->async.result); crypto_free_ahash(hdata->async.s); -- cgit