Mesa (master): glx: plug a leak

Brian Paul brianp at kemper.freedesktop.org
Tue Jun 30 14:57:35 UTC 2009


Module: Mesa
Branch: master
Commit: fa5b0364f90be19bb0e1915f1eea691d06fb8929
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fa5b0364f90be19bb0e1915f1eea691d06fb8929

Author: Kristof Ralovich <kristof.ralovich at gmail.com>
Date:   Tue Jun 30 08:31:18 2009 -0600

glx: plug a leak

Swrast was missing a free for the culmination of driConcatConfigs.

Use free(), not _mesa_free() since we shouldn't be calling any Mesa
functions from the GLX code.  driConcatConfigs() should probably use
regular malloc/free to be consistant but the Mesa functions just wrap
the libc functions anyway.

---

 src/glx/x11/drisw_glx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c
index b843ce4..1c229dd 100644
--- a/src/glx/x11/drisw_glx.c
+++ b/src/glx/x11/drisw_glx.c
@@ -401,6 +401,8 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen,
    psc->configs = driConvertConfigs(psc->core, psc->configs, driver_configs);
    psc->visuals = driConvertConfigs(psc->core, psc->visuals, driver_configs);
 
+   free(driver_configs);
+
    psp->destroyScreen = driDestroyScreen;
    psp->createContext = driCreateContext;
    psp->createDrawable = driCreateDrawable;




More information about the mesa-commit mailing list