diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2020-05-16 21:48:12 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2020-05-16 21:48:12 +0200 |
commit | 9b7757f8fd2b28f6cdf9fa23062706e24a0fbc1c (patch) | |
tree | 6f31a9a0b8ef06535cf2a14f3b967495c1e02cd2 | |
parent | cd18134e3f4d0b1c62c6c3cdb530ca6136058fee (diff) | |
download | compilertests-9b7757f8fd2b28f6cdf9fa23062706e24a0fbc1c.tar.gz compilertests-9b7757f8fd2b28f6cdf9fa23062706e24a0fbc1c.tar.bz2 |
and fixes a memory leak
-rw-r--r-- | ecomp-c/ec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ecomp-c/ec.c b/ecomp-c/ec.c index 3fa4d41..d98999d 100644 --- a/ecomp-c/ec.c +++ b/ecomp-c/ec.c @@ -1250,6 +1250,7 @@ static void parseConstDeclaration( void ) Emit( "; CONST %s -> %s, %d\n", constant[i]->name, constant[i]->type->name, constant[i]->value ); } } + free_expression_node( node ); } static void parseConstBlock( void ) @@ -1318,6 +1319,7 @@ static void parseVariableDeclaration( void ) variable[i]->type = node->symbol->type; } } + free_expression_node( node ); } else { for( i = 0; i < nof_variables; i++ ) { variable[i]->value = 0; |