aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog6
-rw-r--r--e-util/e-memory.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 067996d97c..e4a25d11f5 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,9 @@
+2004-01-05 Not Zed <NotZed@Ximian.com>
+
+ * e-memory.c (e_mempool_destroy): Fix from Zan Lynx
+ <zlynx@acm.org> to lock the memchunk before freeing the pool
+ header.
+
2003-12-06 JP Rosevear <jpr@ximian.com>
* Makefile.am: Remove hard coded disable deprecated flags
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
}
}