From: Panagiotis Papadakos Date: Mon, 5 Feb 2007 15:17:50 +0000 (-0700) Subject: fix mem leaks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eab92fcdc23a8a9d333227e4c98e6a33a9cc1183;p=mesa.git fix mem leaks --- diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c index 0649358ecc8..d88ce913644 100644 --- a/src/glx/x11/dri_glx.c +++ b/src/glx/x11/dri_glx.c @@ -398,6 +398,7 @@ static void driDestroyDisplay(Display *dpy, void *private) else Drivers = driver->next; + Xfree(driver->name); Xfree(driver); break; } diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c index d24f853d546..a039bca234d 100644 --- a/src/glx/x11/glxext.c +++ b/src/glx/x11/glxext.c @@ -396,6 +396,10 @@ static int __glXFreeDisplayPrivate(XExtData *extension) (*priv->driDisplay.destroyDisplay)(priv->dpy, priv->driDisplay.private); priv->driDisplay.private = NULL; + if (priv->driDisplay.createNewScreen) { + Xfree(priv->driDisplay.createNewScreen); /* free array of ptrs */ + priv->driDisplay.createNewScreen = NULL; + } #endif Xfree((char*) priv);