Add a return value to hasher_t.allocate_hash()

This commit is contained in:
Martin Willi
2012-07-16 14:55:06 +02:00
parent e185612dd8
commit 87dd205b61
40 changed files with 269 additions and 149 deletions
+5 -1
View File
@@ -64,7 +64,11 @@ static chunk_t hash_password(char *login, char *password)
}
data = chunk_cata("cc", chunk_create(login, strlen(login)),
chunk_create(password, strlen(password)));
hasher->allocate_hash(hasher, data, &hash);
if (!hasher->allocate_hash(hasher, data, &hash))
{
hasher->destroy(hasher);
return chunk_empty;
}
hasher->destroy(hasher);
return hash;
}