summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-07-09 16:20:32 -0700
committerVinson Lee <[email protected]>2010-07-09 16:20:32 -0700
commit16def3087070d55b2f6c823e825463e87a06cd02 (patch)
tree5bff7c81dafe3c4b09076473aceddf6a802b5894 /src/mesa
parent011e6794e38e0eadc965c1604c00151a88baad42 (diff)
glslcompiler: Fix memory leaks on error paths.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/glslcompiler/glslcompiler.c2
1 files changed, 2 insertions, 0 deletions
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;