summaryrefslogtreecommitdiffstats
path: root/ncr-key.c
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-08-02 15:56:02 +0200
committerMiloslav Trmač <mitr@redhat.com>2010-08-02 15:56:02 +0200
commit9c515c4dfac9de37f1ce5aaefcdaadc5fba82c51 (patch)
tree21b9423c364190e03ff8242fdd2fb65059f676f4 /ncr-key.c
parent2568f1b50cd5cbabbd335e6f34bdfce677d1e608 (diff)
downloadcryptodev-linux-9c515c4dfac9de37f1ce5aaefcdaadc5fba82c51.tar.gz
cryptodev-linux-9c515c4dfac9de37f1ce5aaefcdaadc5fba82c51.tar.xz
cryptodev-linux-9c515c4dfac9de37f1ce5aaefcdaadc5fba82c51.zip
Fix error path in ncr_key_generate
Diffstat (limited to 'ncr-key.c')
-rw-r--r--ncr-key.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ncr-key.c b/ncr-key.c
index 4ea933c..a7fc9b5 100644
--- a/ncr-key.c
+++ b/ncr-key.c
@@ -464,7 +464,8 @@ size_t size;
algo = _ncr_algo_to_properties(gen.params.algorithm);
if (algo == NULL) {
err();
- return ret;
+ ret = -EINVAL;
+ goto fail;
}
item->type = algo->key_type;
if (item->type == NCR_KEY_TYPE_SECRET) {