summaryrefslogtreecommitdiff
path: root/platform/linuxbsd/display_server_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linuxbsd/display_server_x11.cpp')
-rw-r--r--platform/linuxbsd/display_server_x11.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index 6049dbf4d6..78ddef5ff6 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -1471,8 +1471,11 @@ DisplayServer::WindowMode DisplayServerX11::window_get_mode(WindowID p_window) c
if (result == Success && data) {
long *state = (long *)data;
- if (state[0] == WM_IconicState)
+ if (state[0] == WM_IconicState) {
+ XFree(data);
return WINDOW_MODE_MINIMIZED;
+ }
+ XFree(data);
}
}