if (conf->curstate != NULL)
if (conf != NULL && conf->curstate != NULL)
clear_config(struct ifsd_config *oconf){	struct ifsd_state *state;	external_evtimer_setup(&conf->always, IFSD_EVTIMER_DEL);	if (conf->curstate != NULL)		external_evtimer_setup(conf->curstate, IFSD_EVTIMER_DEL);	while ((state = TAILQ_FIRST(&oconf->states)) != NULL) {		TAILQ_REMOVE(&oconf->states, state, entries);		remove_action(state->init, state);		remove_action(state->always, state);		free(state->name);		free(state);	}	remove_action(oconf->always.init, &oconf->always);	remove_action(oconf->always.always, &oconf->always);}