From: Vinson Lee Date: Sat, 10 Dec 2011 22:46:13 +0000 (-0800) Subject: mesa: Fix memory leak on error path. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d32b00db97a140a63b62f2b4945e1a50c7e0d64;p=mesa.git mesa: Fix memory leak on error path. Fixes Coverity resource leak defect. Signed-off-by: Vinson Lee Reviewed-by: Brian Paul --- diff --git a/src/mesa/program/prog_parameter_layout.c b/src/mesa/program/prog_parameter_layout.c index 28fca3b92d9..e4f2db3b379 100644 --- a/src/mesa/program/prog_parameter_layout.c +++ b/src/mesa/program/prog_parameter_layout.c @@ -138,6 +138,7 @@ _mesa_layout_parameters(struct asm_parser_state *state) inst->SrcReg[i].Symbol->param_binding_length); if (new_begin < 0) { + _mesa_free_parameter_list(layout); return GL_FALSE; }