glib 1.2 patch.
- From: Miguel de Icaza <miguel nuclecu unam mx>
- To: gtk-devel-list redhat com
- Subject: glib 1.2 patch.
- Date: Thu, 8 Apr 1999 20:40:41 -0500
This addresses what was pointed out in bug #928:
1999-04-08  Miguel de Icaza  <miguel@nuclecu.unam.mx>
	* ghash.c (g_hash_node_destroy): Clear the key and value fields
	when the node is destroyed.  From bug report #928:
		"This helps a lot when finding leaks in programs.  The
		list containers already do the equivalent of this".
Index: ghash.c
===================================================================
RCS file: /debian/home/gnomecvs/glib/ghash.c,v
retrieving revision 1.17
diff -u -u -r1.17 ghash.c
--- ghash.c	1999/02/24 06:13:35	1.17
+++ ghash.c	1999/04/09 01:37:06
@@ -381,6 +381,8 @@
 g_hash_node_destroy (GHashNode *hash_node)
 {
   G_LOCK (g_hash_global);
+  hash_node->key = NULL;
+  hash_node->value = NULL;
   hash_node->next = node_free_list;
   node_free_list = hash_node;
   G_UNLOCK (g_hash_global);
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]