summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/arbprogparse.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-11-06 11:17:00 -0800
committerIan Romanick <ian.d.romanick@intel.com>2009-11-06 11:17:00 -0800
commit4e4c2ee1fd574d1d651c559f46afb6ca5487156d (patch)
treebac4ff3a1bd0580ff321cac44d5eed9fd347694c /src/mesa/shader/arbprogparse.c
parent96e938f62c729fab74601627d54c9c4cf499ebdf (diff)
parent9348ac03ce23392013ba22c22a182eea4453027a (diff)
downloadexternal_mesa3d-4e4c2ee1fd574d1d651c559f46afb6ca5487156d.zip
external_mesa3d-4e4c2ee1fd574d1d651c559f46afb6ca5487156d.tar.gz
external_mesa3d-4e4c2ee1fd574d1d651c559f46afb6ca5487156d.tar.bz2
Merge branch 'mesa_7_6_branch'
This should fix the memory leaks in the assembly parser without the regressions. The conflicts in program_lexer.l were related to changes in returning strings between the branches (always return IDENTIFIER vs. returing either IDENTIFIER or USED_IDENTIFIER). The conflicts in program_parse.y were related to two changes in master One change prints a variable name in an error message. The other change adds outputVarSize to the OUTPUT_statement rule. The cause the position of the IDENTIFIER to change from $2 to $3. Conflicts: src/mesa/shader/lex.yy.c src/mesa/shader/program_lexer.l src/mesa/shader/program_parse.tab.c src/mesa/shader/program_parse.y
Diffstat (limited to 'src/mesa/shader/arbprogparse.c')
-rw-r--r--src/mesa/shader/arbprogparse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index 05ee4f5..dd732b6 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -87,6 +87,9 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target,
return;
}
+ if (program->Base.String != NULL)
+ _mesa_free(program->Base.String);
+
/* Copy the relevant contents of the arb_program struct into the
* fragment_program struct.
*/
@@ -178,6 +181,9 @@ _mesa_parse_arb_vertex_program(GLcontext *ctx, GLenum target,
return;
}
+ if (program->Base.String != NULL)
+ _mesa_free(program->Base.String);
+
/* Copy the relevant contents of the arb_program struct into the
* vertex_program struct.
*/