summaryrefslogtreecommitdiff
path: root/plugingui/nativewindow_x11.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-11-27 11:16:59 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2017-01-21 14:51:31 +0100
commitb9c849fb2feeba8a24c1b5cb6de8a564d1c2150c (patch)
treea5f08503fe29ee3b0857de6e390be9da449073cd /plugingui/nativewindow_x11.cc
parent29639f5b6da42fc976c883351ef508020f821b59 (diff)
Fix memory leak in X11 backend.
Diffstat (limited to 'plugingui/nativewindow_x11.cc')
-rw-r--r--plugingui/nativewindow_x11.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugingui/nativewindow_x11.cc b/plugingui/nativewindow_x11.cc
index 5d239ea..8a86c80 100644
--- a/plugingui/nativewindow_x11.cc
+++ b/plugingui/nativewindow_x11.cc
@@ -100,6 +100,13 @@ NativeWindowX11::~NativeWindowX11()
return;
}
+ if(buffer)
+ {
+ XDestroyImage(buffer);
+ }
+
+ XFreeGC(display, gc);
+
XDestroyWindow(display, xwindow);
XCloseDisplay(display);
}