reg/tests: Don't call RegCloseKey on uninitialized memory.

Sebastian Lackner sebastian at fds-team.de
Wed Jul 12 08:03:19 CDT 2017


Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---
 programs/reg/tests/reg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/programs/reg/tests/reg.c b/programs/reg/tests/reg.c
index af092908cbc..941d3257c95 100644
--- a/programs/reg/tests/reg.c
+++ b/programs/reg/tests/reg.c
@@ -793,7 +793,7 @@ static void test_import(void)
     DWORD r, dword = 0x123, type, size;
     char test1_reg[MAX_PATH], test2_reg[MAX_PATH], cmdline[MAX_PATH];
     char test_string[] = "Test string", buffer[24];
-    HKEY hkey, subkey;
+    HKEY hkey, subkey = NULL;
     LONG err;
     BYTE hex[8];
 
-- 
2.13.1



More information about the wine-patches mailing list