From a24f24557c32648a1cd1c0913cd66032dc519aee Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Thu, 24 Feb 2011 16:58:36 +0100 Subject: [PATCH] Destroy forb in the correct order This is to avoid deadlocks during forb_destroy(). --- frsh_api/frsh_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frsh_api/frsh_core.c b/frsh_api/frsh_core.c index 3ad34b7..1e17525 100644 --- a/frsh_api/frsh_core.c +++ b/frsh_api/frsh_core.c @@ -161,10 +161,11 @@ err: void frsh_destroy() { + forb_destroy(frsh_forb_global.orb); + pthread_cancel(frsh_forb_global.alloc_executor_thread.pthread_id); pthread_join(frsh_forb_global.alloc_executor_thread.pthread_id, NULL); - forb_destroy(frsh_forb_global.orb); /* TODO: Destroy all FRAs etc. */ } -- 2.39.2