mesa: Fix memory leak on error path.
authorVinson Lee <vlee@vmware.com>
Sat, 10 Dec 2011 22:46:13 +0000 (14:46 -0800)
committerVinson Lee <vlee@vmware.com>
Sat, 17 Dec 2011 05:21:01 +0000 (21:21 -0800)
Fixes Coverity resource leak defect.

Signed-off-by: Vinson Lee <vlee@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/program/prog_parameter_layout.c

index 28fca3b92d917bbb45d7c6434f547d48d9bf65b7..e4f2db3b379498820962122d18e3c0a286990a69 100644 (file)
@@ -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;
               }