https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bfe06cbfca79ba0275ce2eea3a328e26fd1598a2
commit bfe06cbfca79ba0275ce2eea3a328e26fd1598a2 Author: George Bișoc <[email protected]> AuthorDate: Fri Dec 30 19:47:21 2022 +0100 Commit: George Bișoc <[email protected]> CommitDate: Fri Dec 30 19:58:37 2022 +0100 [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. --- sdk/lib/cmlib/hiveinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/lib/cmlib/hiveinit.c b/sdk/lib/cmlib/hiveinit.c index 2b070fb4f7e..3eee62d149e 100644 --- a/sdk/lib/cmlib/hiveinit.c +++ b/sdk/lib/cmlib/hiveinit.c @@ -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);
