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.
This commit is contained in:
Ian Romanick
2009-07-27 12:21:26 -07:00
parent 946ea82bff
commit 94b4556704
3 changed files with 69 additions and 10 deletions

View File

@@ -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.
*/