Skip to content
Snippets Groups Projects
Commit c60ffd28 authored by Jonas Maebe's avatar Jonas Maebe Committed by Jeremy Huddleston Sequoia
Browse files

apple: Fix a use after free


Reviewed-by: default avatarJeremy Huddleston <jeremyhu@apple.com>
parent 802ca81e
No related branches found
No related tags found
No related merge requests found
...@@ -206,6 +206,10 @@ apple_glx_surface_destroy(unsigned int uid) ...@@ -206,6 +206,10 @@ apple_glx_surface_destroy(unsigned int uid)
if (d) { if (d) {
d->types.surface.pending_destroy = true; d->types.surface.pending_destroy = true;
d->release(d); d->release(d);
/* apple_glx_drawable_find_by_uid returns a locked drawable */
d->unlock(d);
/* /*
* We release 2 references to the surface. One was acquired by * We release 2 references to the surface. One was acquired by
* the find, and the other was leftover from a context, or * the find, and the other was leftover from a context, or
...@@ -217,7 +221,5 @@ apple_glx_surface_destroy(unsigned int uid) ...@@ -217,7 +221,5 @@ apple_glx_surface_destroy(unsigned int uid)
* by a glViewport callback (see apple_glx_context_update()). * by a glViewport callback (see apple_glx_context_update()).
*/ */
d->destroy(d); d->destroy(d);
d->unlock(d);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment