summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/fmgr.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-25 16:23:03 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-08-25 16:23:03 +0200
commit84f0f1a64fa2beb00abf30d00072d4f818cf9bd4 (patch)
tree32443ecbb20927b33a6becd50dc6720e4be5b722 /src/ipcpd/normal/fmgr.c
parent830f60599a7912c89b4754e7c757f2ef9e6c00f0 (diff)
parentf7777922edd673e43fd670d3d28f052fde2ecc0a (diff)
downloadouroboros-84f0f1a64fa2beb00abf30d00072d4f818cf9bd4.tar.gz
ouroboros-84f0f1a64fa2beb00abf30d00072d4f818cf9bd4.zip
Merged in dstaesse/ouroboros/be-bugfixing (pull request #226)
ipcpd, normal: Safe handling of CDAP requests
Diffstat (limited to 'src/ipcpd/normal/fmgr.c')
-rw-r--r--src/ipcpd/normal/fmgr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ipcpd/normal/fmgr.c b/src/ipcpd/normal/fmgr.c
index 2e73d71f..3056b46d 100644
--- a/src/ipcpd/normal/fmgr.c
+++ b/src/ipcpd/normal/fmgr.c
@@ -182,8 +182,7 @@ int fmgr_fini()
pthread_cancel(fmgr->listen_thread);
- pthread_join(fmgr->listen_thread,
- NULL);
+ pthread_join(fmgr->listen_thread, NULL);
list_for_each(pos, &fmgr->n_1_flows) {
struct n_1_flow * e =
@@ -194,6 +193,9 @@ int fmgr_fini()
LOG_ERR("Failed to remove management flow.");
}
+ pthread_mutex_destroy(&fmgr->n_1_flows_lock);
+ pthread_mutex_destroy(&fmgr->n_flows_lock);
+
free(fmgr);
return 0;