summaryrefslogtreecommitdiff
path: root/src/manager/storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/manager/storage.c')
-rw-r--r--src/manager/storage.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/manager/storage.c b/src/manager/storage.c
index 5461a4288..6a8e76e5e 100644
--- a/src/manager/storage.c
+++ b/src/manager/storage.c
@@ -58,7 +58,11 @@ METHOD(storage_t, login, int,
data = chunk_alloca(username_len + password_len);
memcpy(data.ptr, username, username_len);
memcpy(data.ptr + username_len, password, password_len);
- hasher->get_hash(hasher, data, hash.ptr);
+ if (!hasher->get_hash(hasher, data, hash.ptr))
+ {
+ hasher->destroy(hasher);
+ return 0;
+ }
hasher->destroy(hasher);
hex_str = chunk_to_hex(hash, NULL, FALSE);