From: Vinson Lee Date: Fri, 9 Jul 2010 23:20:32 +0000 (-0700) Subject: glslcompiler: Fix memory leaks on error paths. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=16def3087070d55b2f6c823e825463e87a06cd02;p=mesa.git glslcompiler: Fix memory leaks on error paths. --- 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;