diff options
author | paulo <paul@bayleaf.org.uk> | 2009-12-17 15:41:58 +0000 |
---|---|---|
committer | paulo <paul@bayleaf.org.uk> | 2009-12-17 15:41:58 +0000 |
commit | 57c08de786262cfb59cbc691ac18712d0ac1e9e3 (patch) | |
tree | b52688512b6703112245bcfd6ee63421abdc0c20 /lib/memory.c | |
parent | 550bd24b6140cbf36e1bbc175d8719b1521a716e (diff) | |
download | quagga-57c08de786262cfb59cbc691ac18712d0ac1e9e3.tar.bz2 quagga-57c08de786262cfb59cbc691ac18712d0ac1e9e3.tar.xz |
Fix shutdown. Move cpu stats command to cli thread.
Diffstat (limited to 'lib/memory.c')
-rw-r--r-- | lib/memory.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 |