From f7777922edd673e43fd670d3d28f052fde2ecc0a Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Thu, 25 Aug 2016 15:54:02 +0200 Subject: ipcpd, normal: Safe handling of CDAP requests Destruction of the object in the reply stage was unsafe. --- src/ipcpd/normal/fmgr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ipcpd/normal/fmgr.c') 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; -- cgit v1.2.3