From cf3c6e62960ce0da62f91f55a88d06b9b8dca04a Mon Sep 17 00:00:00 2001 From: Gunnar Dalsnes Date: Mon, 4 Jul 2005 22:22:22 +0000 Subject: [PATCH] fix premature close og reg key svn path=/trunk/; revision=16417 --- reactos/lib/setupapi/devinst.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/lib/setupapi/devinst.c b/reactos/lib/setupapi/devinst.c index 58b00cb632f..b05d1c12db6 100644 --- a/reactos/lib/setupapi/devinst.c +++ b/reactos/lib/setupapi/devinst.c @@ -1391,7 +1391,7 @@ BOOL WINAPI SetupDiInstallClassW( SetupCloseInfFile(hInf); return FALSE; } - RegCloseKey(hClassKey); + /* Try to append a layout file */ @@ -1414,6 +1414,7 @@ BOOL WINAPI SetupDiInstallClassW( if (FileQueue == INVALID_HANDLE_VALUE) { SetupCloseInfFile(hInf); + RegCloseKey(hClassKey); return FALSE; } @@ -1441,6 +1442,7 @@ BOOL WINAPI SetupDiInstallClassW( SetupCloseInfFile(hInf); + RegCloseKey(hClassKey); return TRUE; }