core: Add state-wide pointer box field

Signed-off-by: Ian Moffett <ian@mirocom.org>
This commit is contained in:
2026-02-14 20:40:08 -05:00
parent eb8a6b84a2
commit 38ae3eaa14
2 changed files with 9 additions and 0 deletions

View File

@@ -16,7 +16,13 @@ rifle_state_init(struct rifle_state *state, const char *in_path)
return -1;
}
if (ptrbox_init(&state->ptrbox) < 0) {
close(state->in_fd);
return -1;
}
if (tokbuf_init(&state->tokbuf) < 0) {
ptrbox_destroy(&state->ptrbox);
close(state->in_fd);
return -1;
}