[PATCH 2/3] winex11.drv: Set hkey to NULL after RegCloseKey() in X11DRV_InitGpu().
Zhiyi Zhang
zzhang at codeweavers.com
Mon Oct 18 21:39:20 CDT 2021
Although it's unlikely, RegCloseKey() may close an already closed key if
the following SetupDiGetDeviceRegistryPropertyW() failed.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
dlls/winex11.drv/display.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c
index bf32e82cb3e..57091522078 100644
--- a/dlls/winex11.drv/display.c
+++ b/dlls/winex11.drv/display.c
@@ -567,6 +567,7 @@ static BOOL X11DRV_InitGpu(HDEVINFO devinfo, const struct x11drv_gpu *gpu, INT g
goto done;
RegCloseKey(hkey);
+ hkey = NULL;
/* Retrieve driver value for adapters */
if (!SetupDiGetDeviceRegistryPropertyW(devinfo, &device_data, SPDRP_DRIVER, NULL, (BYTE *)bufferW, sizeof(bufferW),
--
2.32.0
More information about the wine-devel
mailing list