diff options
author | Vinson Lee <vlee@vmware.com> | 2009-11-02 12:35:47 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-11-02 12:35:47 -0700 |
commit | e0556657526a7fe53d6e17cf70ffa6a8ee35e0a9 (patch) | |
tree | afed93c8468febb20ff0ccf2d9a994da1e8a017b /src/glx | |
parent | 35506dec6734a1ae777dc16981cb19e514f41897 (diff) | |
download | external_mesa3d-e0556657526a7fe53d6e17cf70ffa6a8ee35e0a9.zip external_mesa3d-e0556657526a7fe53d6e17cf70ffa6a8ee35e0a9.tar.gz external_mesa3d-e0556657526a7fe53d6e17cf70ffa6a8ee35e0a9.tar.bz2 |
glx: Fix memory leak if XF86DRICreateDrawable() fails
Signed-off-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/x11/dri_glx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c index ab24bd8..4f7acb6 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 = |