aboutsummaryrefslogtreecommitdiff
path: root/src/app/config/statefile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/config/statefile.c')
-rw-r--r--src/app/config/statefile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/app/config/statefile.c b/src/app/config/statefile.c
index d3a0ec1790..834ad93ed7 100644
--- a/src/app/config/statefile.c
+++ b/src/app/config/statefile.c
@@ -184,6 +184,10 @@ get_state_mgr(void)
return state_mgr;
}
+#define CHECK_STATE_MAGIC(s) STMT_BEGIN \
+ config_check_toplevel_magic(get_state_mgr(), (s)); \
+ STMT_END
+
/** Persistent serialized state. */
static or_state_t *global_state = NULL;
@@ -286,6 +290,7 @@ or_state_validate_cb(const void *old_state, void *state_, char **msg)
/* There is not a meaningful concept of a state-to-state transition,
* since we do not reload the state after we start. */
(void) old_state;
+ CHECK_STATE_MAGIC(state_);
or_state_t *state = state_;