Check memory base instead of the aligned pointer

No behavior change, but it is less confusing to static analyzers
This commit is contained in:
Frank Denis
2016-03-25 09:42:32 +01:00
parent 346f8c131e
commit 02e4b3b842
@@ -118,7 +118,7 @@ static int allocate_memory(block_region **region, uint32_t m_cost) {
memcpy(&memory, &aligned, sizeof memory);
}
#endif
if (!memory) {
if (base == NULL) {
return ARGON2_MEMORY_ALLOCATION_ERROR;
}
(*region)->base = base;