[evolution-patches] 1.4 memory locking fix
- From: Not Zed <notzed ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] 1.4 memory locking fix
- Date: Fri, 09 Jan 2004 16:30:35 +1030
This went around earlier and got fixed in head, but here's a patch
against 1.4.x (identical anyway).
Z
Index: e-util/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/e-util/ChangeLog,v
retrieving revision 1.398.2.9
diff -u -3 -r1.398.2.9 ChangeLog
--- e-util/ChangeLog 24 Oct 2003 21:20:09 -0000 1.398.2.9
+++ e-util/ChangeLog 9 Jan 2004 06:04:29 -0000
@@ -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-10-17 Jeffrey Stedfast <fejj ximian com>
* e-host-utils.c (e_gethostbyname_r): If the system defines
Index: e-util/e-memory.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-memory.c,v
retrieving revision 1.18
diff -u -3 -r1.18 e-memory.c
--- e-util/e-memory.c 2 Nov 2002 08:25:00 -0000 1.18
+++ e-util/e-memory.c 9 Jan 2004 06:04:33 -0000
@@ -536,7 +536,13 @@
{
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
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]