From 86b8defcabcd4baf4d33b415e610e0786be4dc82 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 5 Jan 2004 10:58:53 +0000 Subject: Fix from Zan Lynx to lock the memchunk before freeing the 2004-01-05 Not Zed * e-memory.c (e_mempool_destroy): Fix from Zan Lynx to lock the memchunk before freeing the pool header. svn path=/trunk/; revision=24042 --- e-util/e-memory.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'e-util/e-memory.c') diff --git a/e-util/e-memory.c b/e-util/e-memory.c index cf32147d75..455e2637ff 100644 --- a/e-util/e-memory.c +++ b/e-util/e-memory.c @@ -536,7 +536,13 @@ void e_mempool_destroy(MemPool *pool) { if (pool) { e_mempool_flush(pool, 1); +#ifdef G_THREADS_ENABLED + g_static_mutex_lock(&mempool_mutex); +#endif e_memchunk_free(mempool_memchunk, pool); +#ifdef G_THREADS_ENABLED + g_static_mutex_unlock(&mempool_mutex); +#endif } } -- cgit v1.2.3