https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e723b9f4b40d5e0c6e84e…
commit e723b9f4b40d5e0c6e84e4a0895459f3e93f8f14
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Thu Oct 18 23:07:41 2018 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Thu Oct 18 23:11:55 2018 +0200
[MKHIVE] Fix cases where 'rc' was used without being initialized.
Fixes crashes when the tool is compiled with Run-Time Checks enabled.
And thus should fix the MSVC buildbots!
Thanks to Pierre for having brought this issue to me.
CORE-15201
---
sdk/tools/mkhive/registry.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sdk/tools/mkhive/registry.c b/sdk/tools/mkhive/registry.c
index c188d7a53b..ad0aafc59c 100644
--- a/sdk/tools/mkhive/registry.c
+++ b/sdk/tools/mkhive/registry.c
@@ -572,6 +572,7 @@ RegDeleteKeyW(
else
{
hTargetKey = hKey;
+ rc = ERROR_SUCCESS;
}
/* Don't allow deleting the root */
@@ -618,6 +619,8 @@ RegDeleteKeyW(
/* Release the cell */
HvReleaseCell(Hive, ParentCell);
}
+
+ rc = ERROR_SUCCESS;
}
else
{