diff --git a/src/sec-mod-auth.c b/src/sec-mod-auth.c index 2766d18f..eca9939d 100644 --- a/src/sec-mod-auth.c +++ b/src/sec-mod-auth.c @@ -802,12 +802,12 @@ int handle_sec_auth_init(int cfd, sec_mod_st * sec, const SecAuthInitMsg * req) void sec_auth_user_deinit(sec_mod_st *sec, client_entry_st *e) { - if (e->auth_ctx != NULL) { - seclog(sec, LOG_DEBUG, "permamently closing session of user '%s' "SESSION_STR, e->auth_info.username, e->auth_info.psid); - if (sec->perm_config->acct.amod != NULL && sec->perm_config->acct.amod->close_session != NULL && e->session_is_open != 0) { - sec->perm_config->acct.amod->close_session(e->auth_type, e->auth_ctx, &e->auth_info, &e->saved_stats, e->discon_reason); - } + seclog(sec, LOG_DEBUG, "permamently closing session of user '%s' "SESSION_STR, e->auth_info.username, e->auth_info.psid); + if (sec->perm_config->acct.amod != NULL && sec->perm_config->acct.amod->close_session != NULL && e->session_is_open != 0) { + sec->perm_config->acct.amod->close_session(e->auth_type, e->auth_ctx, &e->auth_info, &e->saved_stats, e->discon_reason); + } + if (e->auth_ctx != NULL) { if (e->module) e->module->auth_deinit(e->auth_ctx); e->auth_ctx = NULL;