diff options
| author | Ian Moffett <ian@mirocom.org> | 2026-05-23 06:03:23 -0400 |
|---|---|---|
| committer | Ian Moffett <ian@mirocom.org> | 2026-05-23 06:04:40 -0400 |
| commit | f99c1d678f3310a3679b24e518355fbb00211273 (patch) | |
| tree | 8ec6498d4c591fd2776e203296232d73740200f3 /core/state.c | |
| parent | 32635789dca1c35224ce6e320a03db23e56d380f (diff) | |
core: Add pointer box / RAII impl
Signed-off-by: Ian Moffett <ian@mirocom.org>
Diffstat (limited to 'core/state.c')
| -rw-r--r-- | core/state.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); } |
