diff options
-rw-r--r-- | ncr-sessions.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ncr-sessions.c b/ncr-sessions.c index 6648ec8..c30bc66 100644 --- a/ncr-sessions.c +++ b/ncr-sessions.c @@ -417,6 +417,12 @@ static int _ncr_session_init(struct ncr_lists* lists, struct ncr_session_st* ses ret = -EINVAL; goto fail; } + str = _ncr_algo_to_str(session->algorithm); + if (str == NULL) { + err(); + ret = -EINVAL; + goto fail; + } ret = cryptodev_hash_init(&ns->hash, str, 0, NULL, 0); if (ret < 0) { |