From 57c08de786262cfb59cbc691ac18712d0ac1e9e3 Mon Sep 17 00:00:00 2001 From: paulo Date: Thu, 17 Dec 2009 15:41:58 +0000 Subject: Fix shutdown. Move cpu stats command to cli thread. --- lib/memory.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/memory.c') diff --git a/lib/memory.c b/lib/memory.c index 36599f18..9bb49d18 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -524,7 +524,12 @@ void memory_finish (void) { if (memory_mutex) - memory_mutex = qpt_mutex_destroy(memory_mutex, 1); + { + /* avoid re-entrancy with memory disposal */ + qpt_mutex_t* mx = memory_mutex; + memory_mutex = NULL; + qpt_mutex_destroy(mx, 1); + } } void -- cgit v1.2.3