summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ncr-key.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ncr-key.c b/ncr-key.c
index d4f32b1..13bdb18 100644
--- a/ncr-key.c
+++ b/ncr-key.c
@@ -448,7 +448,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) {