Zhiyi Zhang : setupapi: Fix a registry key handle leak.

Alexandre Julliard julliard at winehq.org
Fri Aug 7 10:42:30 CDT 2020


Module: wine
Branch: stable
Commit: 617b3b0c3364af02a7a0d3a11263968d26f25107
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=617b3b0c3364af02a7a0d3a11263968d26f25107

Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date:   Fri Apr 17 21:51:01 2020 +0800

setupapi: Fix a registry key handle leak.

Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit e570c2fe591ee2680bd18ef31e9d657f3d0f389b)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/setupapi/devinst.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index e561fcd996..f3546e6d96 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -4224,6 +4224,7 @@ BOOL WINAPI SetupDiGetDevicePropertyW(HDEVINFO devinfo, PSP_DEVINFO_DATA device_
     {
         value_size = prop_buff_size;
         ls = RegQueryValueExW(hkey, NULL, NULL, &value_type, prop_buff, &value_size);
+        RegCloseKey(hkey);
     }
 
     switch (ls)




More information about the wine-cvs mailing list