From: Hermès Bélusca-Maïto Date: Thu, 18 Oct 2018 21:07:41 +0000 (+0200) Subject: [MKHIVE] Fix cases where 'rc' was used without being initialized. X-Git-Tag: 0.4.12-dev~514 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=e723b9f4b40d5e0c6e84e4a0895459f3e93f8f14 [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 --- diff --git a/sdk/tools/mkhive/registry.c b/sdk/tools/mkhive/registry.c index c188d7a53b9..ad0aafc59c5 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 {