core: Zero state structure

Signed-off-by: Ian Moffett <ian@mirocom.org>
This commit is contained in:
2026-02-09 17:24:50 -05:00
parent cc0825af68
commit 99598165ea

View File

@@ -68,6 +68,7 @@ state_init(struct cav_state *state)
return -1;
}
memset(state, 0, sizeof(*state));
state->dir_fd = open(input_name, O_RDONLY);
if (state->dir_fd < 0) {
return -1;
@@ -79,7 +80,6 @@ state_init(struct cav_state *state)
return -1;
}
state->pass_count = 0;
return 0;
}