From 94b45567047fd681666f261f1ad0164049f0491a Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 27 Jul 2009 12:21:26 -0700 Subject: ARB prog: Clean up several memory leaks As far as I am able to determine via code inspection and using Valgrind, that should be all of the leaks in the parser. --- src/mesa/shader/program_parser.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/mesa/shader/program_parser.h') diff --git a/src/mesa/shader/program_parser.h b/src/mesa/shader/program_parser.h index b4c24ec92c..e17ffd2322 100644 --- a/src/mesa/shader/program_parser.h +++ b/src/mesa/shader/program_parser.h @@ -39,6 +39,7 @@ enum asm_type { }; struct asm_symbol { + struct asm_symbol *next; /**< List linkage for freeing. */ const char *name; enum asm_type type; unsigned attrib_binding; @@ -134,6 +135,14 @@ struct asm_parser_state { struct _mesa_symbol_table *st; + /** + * Linked list of symbols + * + * This list is \b only used when cleaning up compiler state and freeing + * memory. + */ + struct asm_symbol *sym; + /** * State for the lexer. */ -- cgit v1.2.3