Module: Mesa Branch: mesa_7_6_branch Commit: e0556657526a7fe53d6e17cf70ffa6a8ee35e0a9 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e0556657526a7fe53d6e17cf70ffa6a8ee35e0a9
Author: Vinson Lee <[email protected]> Date: Mon Nov 2 12:35:47 2009 -0700 glx: Fix memory leak if XF86DRICreateDrawable() fails Signed-off-by: Brian Paul <[email protected]> --- 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 = _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
