Don't leak a handle from _g_io_win32_get_module()

This call increments the DLL refcount by default and
needs a flag to avoid that.
This commit is contained in:
Руслан Ижбулатов 2021-03-25 15:20:27 +00:00
parent f701d6c497
commit 03b574ae66

View File

@ -1120,7 +1120,8 @@ void *
_g_io_win32_get_module (void) _g_io_win32_get_module (void)
{ {
if (!gio_dll) if (!gio_dll)
GetModuleHandleExA (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, GetModuleHandleExA (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
(const char *) _g_io_win32_get_module, (const char *) _g_io_win32_get_module,
&gio_dll); &gio_dll);
return gio_dll; return gio_dll;