Browse Source

fix mem leaks

tags/pre-merge-glsl-compiler-1
Panagiotis Papadakos 18 years ago
parent
commit
eab92fcdc2
2 changed files with 5 additions and 0 deletions
  1. 1
    0
      src/glx/x11/dri_glx.c
  2. 4
    0
      src/glx/x11/glxext.c

+ 1
- 0
src/glx/x11/dri_glx.c View File

@@ -398,6 +398,7 @@ static void driDestroyDisplay(Display *dpy, void *private)
else
Drivers = driver->next;

Xfree(driver->name);
Xfree(driver);
break;
}

+ 4
- 0
src/glx/x11/glxext.c View File

@@ -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);

Loading…
Cancel
Save