gjs r121 - trunk/gi



Author: otaylor
Date: Thu Nov 20 14:58:52 2008
New Revision: 121
URL: http://svn.gnome.org/viewvc/gjs?rev=121&view=rev

Log:
Don't free prov->gboxed for "has_parent" Boxed

For a Boxed that represents a nested structure, when we free the Boxed,
we shouldn't free the memory that priv->gboxed points to - it's just
a pointer inside the parent object's memory.

http://bugzilla.gnome.org/show_bug.cgi?id=561686

Modified:
   trunk/gi/boxed.c

Modified: trunk/gi/boxed.c
==============================================================================
--- trunk/gi/boxed.c	(original)
+++ trunk/gi/boxed.c	Thu Nov 20 14:58:52 2008
@@ -556,7 +556,7 @@
     if (priv == NULL)
         return; /* wrong class? */
 
-    if (priv->gboxed) {
+    if (priv->gboxed && !priv->has_parent) {
         if (priv->allocated_directly) {
             g_slice_free1(g_struct_info_get_size (priv->info), priv->gboxed);
         } else {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]