mirror of
https://github.com/glfw/glfw.git
synced 2025-10-03 13:20:58 +00:00
Fix memory leak in wl_monitor.c void _glfwAddOutput(uint32_t name, uint32_t version)
Monitor was allocated but not freed
This commit is contained in:
parent
1f0c7fe7bb
commit
7409378c7e
@ -612,9 +612,22 @@ void _glfwPlatformTerminate(void)
|
||||
wl_display_flush(_glfw.wl.display);
|
||||
if (_glfw.wl.display)
|
||||
wl_display_disconnect(_glfw.wl.display);
|
||||
|
||||
if (_glfw.wl.monitors)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < _glfw.wl.monitorsCount; ++i)
|
||||
{
|
||||
if (_glfw.wl.monitors[i])
|
||||
{
|
||||
if (_glfw.wl.monitors[i]->wl.modes)
|
||||
free(_glfw.wl.monitors[i]->wl.modes);
|
||||
free(_glfw.wl.monitors[i]);
|
||||
}
|
||||
}
|
||||
free(_glfw.wl.monitors);
|
||||
}
|
||||
}
|
||||
|
||||
const char* _glfwPlatformGetVersionString(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user