From f99c1d678f3310a3679b24e518355fbb00211273 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 23 May 2026 06:03:23 -0400 Subject: core: Add pointer box / RAII impl Signed-off-by: Ian Moffett --- core/state.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/state.c') diff --git a/core/state.c b/core/state.c index dce1316..6002957 100644 --- a/core/state.c +++ b/core/state.c @@ -33,6 +33,11 @@ state_init(struct cescal_state *state, const char *pathname) return -1; } + if (ptrbox_init(&state->ptrbox) < 0) { + close(state->in_fd); + return -1; + } + return 0; } @@ -41,4 +46,5 @@ state_close(struct cescal_state *state) { close(state->in_fd); state->in_fd = -1; + ptrbox_destroy(&state->ptrbox); } -- cgit v1.2.3