diff options
author | Not Zed <NotZed@Ximian.com> | 2004-01-05 18:58:53 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-01-05 18:58:53 +0800 |
commit | 86b8defcabcd4baf4d33b415e610e0786be4dc82 (patch) | |
tree | 799b97fcd43bbcec022163819d0b7f115171922b /e-util/e-memory.c | |
parent | eb1b03faa88703571b5607b4462ab4ef17fe74ff (diff) | |
download | gsoc2013-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/e-memory.c')
-rw-r--r-- | e-util/e-memory.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 } } |