diff options
Diffstat (limited to 'src/ipcpd/normal/main.c')
-rw-r--r-- | src/ipcpd/normal/main.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c index a067fb83..f0fc0681 100644 --- a/src/ipcpd/normal/main.c +++ b/src/ipcpd/normal/main.c @@ -80,15 +80,6 @@ void ipcp_sig_handler(int sig, siginfo_t * info, void * c) ipcp_set_state(_ipcp, IPCP_SHUTDOWN); pthread_rwlock_unlock(&_ipcp->state_lock); - - if (fmgr_fini()) - LOG_ERR("Failed to finalize flow manager."); - - if (ribmgr_fini()) - LOG_ERR("Failed to finalize RIB manager."); - - if (frct_fini()) - LOG_ERR("Failed to finalize FRCT."); } default: return; @@ -247,9 +238,9 @@ void normal_ipcp_data_destroy() if (normal_data(_ipcp)->rb != NULL) shm_ap_rbuff_close(normal_data(_ipcp)->rb); - pthread_rwlock_unlock(&_ipcp->state_lock); - ipcp_data_destroy(_ipcp->data); + + pthread_rwlock_unlock(&_ipcp->state_lock); } int main(int argc, char * argv[]) @@ -339,6 +330,15 @@ int main(int argc, char * argv[]) pthread_join(normal_data(_ipcp)->mainloop, NULL); + if (fmgr_fini()) + LOG_ERR("Failed to finalize flow manager."); + + if (ribmgr_fini()) + LOG_ERR("Failed to finalize RIB manager."); + + if (frct_fini()) + LOG_ERR("Failed to finalize FRCT."); + normal_ipcp_data_destroy(); free(_ipcp); close_logfile(); |