Fix problem where if g_mem_chunk_reset() is called on an alloc-only
authorOwen Taylor <otaylor@redhat.com>
Fri, 22 Mar 2002 23:01:01 +0000 (23:01 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Fri, 22 Mar 2002 23:01:01 +0000 (23:01 +0000)
Fri Mar 22 17:59:27 2002  Owen Taylor  <otaylor@redhat.com>

        * glib/gmem.c (g_mem_chunk_reset): Fix problem where
        if g_mem_chunk_reset() is called on an alloc-only
        memchunk, then a useles GTree was created.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gmem.c

index 7f32eb5..65935d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Mar 22 17:59:27 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmem.c (g_mem_chunk_reset): Fix problem where
+       if g_mem_chunk_reset() is called on an alloc-only
+       memchunk, then a useles GTree was created.
+
 Wed Mar 20 18:20:21 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gconvert.c (open_converter): Try to work around segfaults
index 7f32eb5..65935d5 100644 (file)
@@ -1,3 +1,9 @@
+Fri Mar 22 17:59:27 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmem.c (g_mem_chunk_reset): Fix problem where
+       if g_mem_chunk_reset() is called on an alloc-only
+       memchunk, then a useles GTree was created.
+
 Wed Mar 20 18:20:21 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gconvert.c (open_converter): Try to work around segfaults
index 7f32eb5..65935d5 100644 (file)
@@ -1,3 +1,9 @@
+Fri Mar 22 17:59:27 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmem.c (g_mem_chunk_reset): Fix problem where
+       if g_mem_chunk_reset() is called on an alloc-only
+       memchunk, then a useles GTree was created.
+
 Wed Mar 20 18:20:21 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gconvert.c (open_converter): Try to work around segfaults
index 7f32eb5..65935d5 100644 (file)
@@ -1,3 +1,9 @@
+Fri Mar 22 17:59:27 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmem.c (g_mem_chunk_reset): Fix problem where
+       if g_mem_chunk_reset() is called on an alloc-only
+       memchunk, then a useles GTree was created.
+
 Wed Mar 20 18:20:21 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gconvert.c (open_converter): Try to work around segfaults
index 7f32eb5..65935d5 100644 (file)
@@ -1,3 +1,9 @@
+Fri Mar 22 17:59:27 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmem.c (g_mem_chunk_reset): Fix problem where
+       if g_mem_chunk_reset() is called on an alloc-only
+       memchunk, then a useles GTree was created.
+
 Wed Mar 20 18:20:21 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gconvert.c (open_converter): Try to work around segfaults
index 7f32eb5..65935d5 100644 (file)
@@ -1,3 +1,9 @@
+Fri Mar 22 17:59:27 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmem.c (g_mem_chunk_reset): Fix problem where
+       if g_mem_chunk_reset() is called on an alloc-only
+       memchunk, then a useles GTree was created.
+
 Wed Mar 20 18:20:21 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gconvert.c (open_converter): Try to work around segfaults
index 7f32eb5..65935d5 100644 (file)
@@ -1,3 +1,9 @@
+Fri Mar 22 17:59:27 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * glib/gmem.c (g_mem_chunk_reset): Fix problem where
+       if g_mem_chunk_reset() is called on an alloc-only
+       memchunk, then a useles GTree was created.
+
 Wed Mar 20 18:20:21 2002  Owen Taylor  <otaylor@redhat.com>
 
        * glib/gconvert.c (open_converter): Try to work around segfaults
index 7329aee..5ffe06a 100644 (file)
@@ -1021,8 +1021,10 @@ g_mem_chunk_reset (GMemChunk *mem_chunk)
   mem_chunk->free_atoms = NULL;
   
   if (mem_chunk->mem_tree)
-    g_tree_destroy (mem_chunk->mem_tree);
-  mem_chunk->mem_tree = g_tree_new ((GCompareFunc) g_mem_chunk_area_compare);
+    {
+      g_tree_destroy (mem_chunk->mem_tree);
+      mem_chunk->mem_tree = g_tree_new ((GCompareFunc) g_mem_chunk_area_compare);
+    }
 
   LEAVE_MEM_CHUNK_ROUTINE ();
 }