From: Marek Olšák Date: Thu, 25 Aug 2011 02:11:05 +0000 (+0200) Subject: glsl_to_tgsi: fix a reference leak on an error path X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b2064ff3115afa075021902ecd35f4a5a772dc9e;p=mesa.git glsl_to_tgsi: fix a reference leak on an error path --- diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 22660830a9b..3fbb0cdd248 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -5050,6 +5050,7 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) break; } if (!ok) { + _mesa_reference_program(ctx, &linked_prog, NULL); return GL_FALSE; } }