Zhiyi Zhang (@zhiyi) commented about dlls/winex11.drv/desktop.c:
'D','e','s','k','t','o','p','s',0};
- static const WCHAR defaultW[] = {'D','e','f','a','u','l','t',0};
- WCHAR buffer[4096];
- KEY_VALUE_PARTIAL_INFORMATION *value = (void *)buffer;
- DWORD size;
- HKEY hkey;
- *width = 800;
- *height = 600;
- /* @@ Wine registry key: HKCU\Software\Wine\Explorer\Desktops */
- if (!(hkey = reg_open_hkcu_key( desktop_keyW, sizeof(desktop_keyW) )))
return FALSE;
- size = query_reg_value( hkey, defaultW, value, sizeof(buffer) );
- if (!size || value->Type != REG_SZ) return FALSE;
hkey is leaked here. You should close hkey right after query_reg_value().