summaryrefslogtreecommitdiffstats
path: root/cryptodev_cipher.c
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-07-20 02:27:57 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-21 20:13:48 +0200
commit619da468b62aed1c15fd81a4f630bcbb7c12dd7d (patch)
tree1b3635bec8071733178437a76fe8e73fd53086b9 /cryptodev_cipher.c
parent15d18ae53061d716a892adb04d65baa9c6e7fbf1 (diff)
downloadcryptodev-linux-619da468b62aed1c15fd81a4f630bcbb7c12dd7d.tar.gz
cryptodev-linux-619da468b62aed1c15fd81a4f630bcbb7c12dd7d.tar.xz
cryptodev-linux-619da468b62aed1c15fd81a4f630bcbb7c12dd7d.zip
Fix error handling in cryptodev_hash_init
Diffstat (limited to 'cryptodev_cipher.c')
-rw-r--r--cryptodev_cipher.c4
1 files changed, 3 insertions, 1 deletions
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);