summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/glx
diff options
context:
space:
mode:
authorGeorge Kyriazis <george.kyriazis@intel.com>2016-03-04 12:26:00 -0700
committerBrian Paul <brianp@vmware.com>2016-03-04 18:14:46 -0700
commitfeb71117aebc0932a96b548b4c402b010a008b2d (patch)
tree92c44a5901d46d4d99d3e438268029af2c39b801 /src/gallium/state_trackers/glx
parent1f862e923cba1d5cd54a707f70f0be113635e855 (diff)
st/xlib: Don't destroy screen on XCloseDisplay()
screen may still be used by other resources that are not yet freed. To correctly fix this there will be a need to account for resources differently, but this quick fix is not any worse than the original code that leaked screens anyway. Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium/state_trackers/glx')
-rw-r--r--src/gallium/state_trackers/glx/xlib/xm_api.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index cee4f18295..5799cce033 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -174,9 +174,13 @@ xmesa_close_display(Display *display)
/* don't forget to clean up mesaDisplay */
XMesaDisplay xmdpy = &info->mesaDisplay;
- if (xmdpy->screen) {
- xmdpy->screen->destroy(xmdpy->screen);
- }
+ /**
+ * XXX: Don't destroy the screens here, since there may still
+ * be some dangling screen pointers that are used after this point
+ * if (xmdpy->screen) {
+ * xmdpy->screen->destroy(xmdpy->screen);
+ * }
+ */
free(xmdpy->smapi);
XFree((char *) info);