summaryrefslogtreecommitdiff
path: root/core/state.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/state.c')
-rw-r--r--core/state.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/state.c b/core/state.c
index f6ed48e..b64271c 100644
--- a/core/state.c
+++ b/core/state.c
@@ -35,6 +35,11 @@ state_init(struct cescal_state *state, const char *pathname)
return -1;
}
+ if (symbol_table_init(&state->symtab) < 0) {
+ close(state->in_fd);
+ return -1;
+ }
+
if (ptrbox_init(&state->ptrbox) < 0) {
close(state->in_fd);
return -1;
@@ -50,4 +55,5 @@ state_close(struct cescal_state *state)
state->in_fd = -1;
ptrbox_destroy(&state->ptrbox);
tokbuf_destroy(&state->tokbuf);
+ symbol_table_destroy(&state->symtab);
}