mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 15:00:11 +01:00
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>
This commit is contained in:
parent
1f862e923c
commit
feb71117ae
1 changed files with 7 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue