mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
glx: fix memory leak related to __glXCloseDisplay()
Indeed, the unbind function is not called which could lead to an unbalanced refcount state for the "drawable" object. For instance, with "piglit/bin/glx-fbo-binding -auto" while setting GALLIUM_REFCNT_LOG=refcnt.log. Signed-off-by: Patrick Lerda <patrick9876@free.fr> Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22024>
This commit is contained in:
parent
19b89c8077
commit
84762bb1cf
1 changed files with 3 additions and 0 deletions
|
|
@ -262,6 +262,9 @@ glx_display_free(struct glx_display *priv)
|
|||
|
||||
gc = __glXGetCurrentContext();
|
||||
if (priv->dpy == gc->currentDpy) {
|
||||
if (gc != &dummyContext)
|
||||
gc->vtable->unbind(gc);
|
||||
|
||||
gc->vtable->destroy(gc);
|
||||
__glXSetCurrentContextNull();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue