summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/main.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-09-08 09:48:19 +0000
committerSander Vrijders <sander.vrijders@ugent.be>2017-09-08 09:48:19 +0000
commit7693e3f335d0aab300410623aac7ae9dee2d3548 (patch)
treeac25301bd6a8554974c26f893f8ca8ef87576aca /src/ipcpd/normal/main.c
parentf01187436eb51f955db604ad5fd19bf1389fb544 (diff)
parent121df4d95f760a62e26f85fdca043558d2585bb1 (diff)
downloadouroboros-7693e3f335d0aab300410623aac7ae9dee2d3548.tar.gz
ouroboros-7693e3f335d0aab300410623aac7ae9dee2d3548.zip
Merged in dstaesse/ouroboros/be-ipcpd-main-fix (pull request #587)
ipcpd: Fix double finalization after some failures
Diffstat (limited to 'src/ipcpd/normal/main.c')
-rw-r--r--src/ipcpd/normal/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c
index bc135c31..22b6e718 100644
--- a/src/ipcpd/normal/main.c
+++ b/src/ipcpd/normal/main.c
@@ -142,10 +142,6 @@ static void finalize_components(void)
free(ipcpi.dif_name);
- enroll_fini();
-
- connmgr_fini();
-
rib_fini();
}
@@ -397,9 +393,12 @@ int main(int argc,
if (ipcp_get_state() == IPCP_SHUTDOWN) {
dt_stop();
stop_components();
+ finalize_components();
}
- finalize_components();
+ enroll_fini();
+
+ connmgr_fini();
irm_unbind_api(getpid(), ipcpi.name);