https://bugs.winehq.org/show_bug.cgi?id=36348
--- Comment #3 from Austin English austinenglish@gmail.com --- (In reply to Henri Verbeet from comment #2)
Created attachment 51301 [details] patch
I think the attached patch should help. I don't see how the leaks from comment 0 happen, as far as I can see here the allocations are properly free'd again.
The leaks from comment #0 aren't occurring in 1.7.41. The patch does help, though a new issue appears after that: ==31771== Conditional jump or move depends on uninitialised value(s) ==31771== at 0x4E9551A: normalize_nonclientmetrics (sysparams.c:635) ==31771== by 0x4E97938: SystemParametersInfoW (sysparams.c:1583) ==31771== by 0x4E9A583: GetSystemMetrics (sysparams.c:2414) ==31771== by 0x4E9A6FB: GetSystemMetrics (sysparams.c:2433) ==31771== by 0x4EAE481: WINPOS_GetMinMaxInfo (winpos.c:774) ==31771== by 0x4EA7291: WIN_CreateWindowEx (win.c:1565) ==31771== by 0x4EA7A8D: CreateWindowExW (win.c:1748) ==31771== by 0x521FE3D: grab_clipping_window (mouse.c:372) ==31771== by 0x5220590: clip_fullscreen_window (mouse.c:520) ==31771== by 0x520C6E1: update_windows_on_desktop_resize (desktop.c:210) ==31771== by 0x4EAAF39: EnumWindows (win.c:3291) ==31771== by 0x520CAB8: X11DRV_resize_desktop (desktop.c:285) ==31771== by 0x524759C: xrandr12_set_current_mode (xrandr.c:362) ==31771== by 0x5233031: X11DRV_ChangeDisplaySettingsEx (settings.c:420) ==31771== by 0x4E9B40E: ChangeDisplaySettingsExW (sysparams.c:2795) ==31771== by 0x4B6A790: wined3d_set_adapter_display_mode (directx.c:3965) ==31771== by 0x4BF4C92: wined3d_swapchain_activate (swapchain.c:1207) ==31771== by 0x4B5D3E2: device_process_message (device.c:5035) ==31771== by 0x4C0DECF: wined3d_wndproc (wined3d_main.c:404) ==31771== by 0x4EB44C9: ??? (winproc.c:174) ==31771== Uninitialised value was created by a stack allocation ==31771== at 0x4E9548B: normalize_nonclientmetrics (sysparams.c:626) ==31771==