Zhiyi Zhang : winex11.drv: Set hkey to NULL after RegCloseKey() in X11DRV_InitGpu().
Alexandre Julliard
julliard at winehq.org
Tue Oct 19 16:07:47 CDT 2021
Module: wine
Branch: master
Commit: 82938e833fae985911f97558316f62fda3b20d4d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=82938e833fae985911f97558316f62fda3b20d4d
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Tue Oct 19 10:39:20 2021 +0800
winex11.drv: Set hkey to NULL after RegCloseKey() in X11DRV_InitGpu().
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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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),
More information about the wine-cvs
mailing list