[PATCH] setupapi: Fix a registry key handle leak.

Zhiyi Zhang zzhang at codeweavers.com
Fri Apr 17 08:51:01 CDT 2020


Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
Thanks to Sven for spotting this.

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

diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index a21959a262a..617e3f54c37 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -4230,6 +4230,7 @@ static LSTATUS get_device_property(struct device *device, const DEVPROPKEY *prop
     {
         value_size = prop_buff_size;
         ls = RegQueryValueExW(hkey, NULL, NULL, &value_type, prop_buff, &value_size);
+        RegCloseKey(hkey);
     }
 
     switch (ls)
-- 
2.20.1



More information about the wine-devel mailing list