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>
/* 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);