summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/glx/x11/dri_glx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c
index ab24bd8ffe..4f7acb6cc3 100644
--- a/src/glx/x11/dri_glx.c
+++ b/src/glx/x11/dri_glx.c
@@ -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 =