[SDK][CMLIB] Properly check for failure if hive free list creation fails

HvpCreateHiveFreeCellList returns a NTSTATUS code yet the way the code path checks
checks for failure is just wrong. This was spotted whilst working on #4571 PR.
This commit is contained in:
George Bișoc 2022-12-30 19:47:21 +01:00
parent afbc446ec7
commit bfe06cbfca
No known key found for this signature in database
GPG key ID: 688C4FBE25D7DEF6

View file

@ -306,7 +306,7 @@ HvpInitializeMemoryHive(
BlockIndex += Bin->Size / HBLOCK_SIZE;
}
if (HvpCreateHiveFreeCellList(Hive))
if (!NT_SUCCESS(HvpCreateHiveFreeCellList(Hive)))
{
HvpFreeHiveBins(Hive);
Hive->Free(Hive->BaseBlock, Hive->BaseBlockAlloc);