diff options
-rw-r--r-- | cxrefbas.c | 1 | ||||
-rw-r--r-- | linetab.c | 5 | ||||
-rw-r--r-- | linetab.h | 1 | ||||
-rw-r--r-- | renumbas.c | 1 |
4 files changed, 8 insertions, 0 deletions
@@ -67,6 +67,7 @@ int main(int argc, char **argv) { build_ref_table(); print_ref_table(); + free_ref_table(); return 0; } @@ -164,3 +164,8 @@ void build_ref_table(void) { on_start_stmt = on_cmd_token = on_exp_token = on_var_token = 0; } +void free_ref_table(void) { + int i; + for(i = 0; i < 32768; i++) + if(linerefs[i]) free(linerefs[i]); +} @@ -20,3 +20,4 @@ extern int lines_exist[]; extern void add_lineref(unsigned short from, unsigned short pos); extern void build_ref_table(void); +extern void free_ref_table(void); @@ -119,6 +119,7 @@ int main(int argc, char **argv) { build_ref_table(); renumber(); + free_ref_table(); open_output(output_filename); writefile(); |