From 16def3087070d55b2f6c823e825463e87a06cd02 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 9 Jul 2010 16:20:32 -0700 Subject: glslcompiler: Fix memory leaks on error paths. --- src/mesa/drivers/glslcompiler/glslcompiler.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mesa/drivers/glslcompiler/glslcompiler.c b/src/mesa/drivers/glslcompiler/glslcompiler.c index d002300e092..4211e69ff9b 100644 --- a/src/mesa/drivers/glslcompiler/glslcompiler.c +++ b/src/mesa/drivers/glslcompiler/glslcompiler.c @@ -125,6 +125,7 @@ CreateContext(void) _mesa_destroy_visual(vis); if (buf) _mesa_destroy_framebuffer(buf); + free(cc); return GL_FALSE; } @@ -142,6 +143,7 @@ CreateContext(void) !_tnl_CreateContext( ctx ) || !_swsetup_CreateContext( ctx )) { _mesa_destroy_visual(vis); + _mesa_destroy_framebuffer(buf); _mesa_free_context_data(ctx); free(cc); return GL_FALSE; -- cgit v1.2.3