aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-01-05 18:58:53 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-01-05 18:58:53 +0800
commit86b8defcabcd4baf4d33b415e610e0786be4dc82 (patch)
tree799b97fcd43bbcec022163819d0b7f115171922b /e-util
parenteb1b03faa88703571b5607b4462ab4ef17fe74ff (diff)
downloadgsoc2013-evolution-86b8defcabcd4baf4d33b415e610e0786be4dc82.tar.gz
gsoc2013-evolution-86b8defcabcd4baf4d33b415e610e0786be4dc82.tar.zst
gsoc2013-evolution-86b8defcabcd4baf4d33b415e610e0786be4dc82.zip
Fix from Zan Lynx <zlynx@acm.org> to lock the memchunk before freeing the
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. svn path=/trunk/; revision=24042
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
}
}