summaryrefslogtreecommitdiff
path: root/core/state.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/state.c')
-rw-r--r--core/state.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/state.c b/core/state.c
index 7d80acd..912508c 100644
--- a/core/state.c
+++ b/core/state.c
@@ -23,6 +23,11 @@ state_init(struct cescal_state *state, const char *pathname)
return -1;
}
+ if (tokbuf_init(&state->tokbuf) < 0) {
+ close(state->in_fd);
+ return -1;
+ }
+
return 0;
}