mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 16:10:09 +01:00
apple: Fix a use after free
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
802ca81e26
commit
c60ffd2840
1 changed files with 4 additions and 2 deletions
|
|
@ -206,6 +206,10 @@ apple_glx_surface_destroy(unsigned int uid)
|
|||
if (d) {
|
||||
d->types.surface.pending_destroy = true;
|
||||
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
|
||||
* the find, and the other was leftover from a context, or
|
||||
|
|
@ -217,7 +221,5 @@ apple_glx_surface_destroy(unsigned int uid)
|
|||
* by a glViewport callback (see apple_glx_context_update()).
|
||||
*/
|
||||
d->destroy(d);
|
||||
|
||||
d->unlock(d);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue