mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 10:00:14 +01:00
glx: Fix memory leak if XF86DRICreateDrawable() fails
Signed-off-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
35506dec67
commit
e055665752
1 changed files with 3 additions and 1 deletions
|
|
@ -596,8 +596,10 @@ driCreateDrawable(__GLXscreenConfigs * psc,
|
|||
pdraw->drawable = drawable;
|
||||
pdraw->psc = psc;
|
||||
|
||||
if (!XF86DRICreateDrawable(psc->dpy, psc->scr, drawable, &hwDrawable))
|
||||
if (!XF86DRICreateDrawable(psc->dpy, psc->scr, drawable, &hwDrawable)) {
|
||||
Xfree(pdraw);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Create a new drawable */
|
||||
pdraw->driDrawable =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue