From e723b9f4b40d5e0c6e84e4a0895459f3e93f8f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Thu, 18 Oct 2018 23:07:41 +0200 Subject: [PATCH] [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 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 {