summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program_parser.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-07-27 12:21:26 -0700
committerIan Romanick <ian.d.romanick@intel.com>2009-07-27 12:21:26 -0700
commit94b45567047fd681666f261f1ad0164049f0491a (patch)
tree01f1a68b8ea73caa62a95c614fd0979257cf2db3 /src/mesa/shader/program_parser.h
parent946ea82bff530ac7aa8f5ebe56704fde62e14e86 (diff)
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.
Diffstat (limited to 'src/mesa/shader/program_parser.h')
-rw-r--r--src/mesa/shader/program_parser.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/shader/program_parser.h b/src/mesa/shader/program_parser.h
index b4c24ec92cc..e17ffd23223 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;
@@ -135,6 +136,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.
*/
void *scanner;