gobject-introspection r981 - trunk/girepository



Author: walters
Date: Mon Dec  1 17:05:37 2008
New Revision: 981
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=981&view=rev

Log:
Fix memory leak; unref type info we created, not field info

We expect callers to own the FieldInfo, we should not unref it.  However
we should unref the type info we accessed.

Modified:
   trunk/girepository/gfield.c

Modified: trunk/girepository/gfield.c
==============================================================================
--- trunk/girepository/gfield.c	(original)
+++ trunk/girepository/gfield.c	Mon Dec  1 17:05:37 2008
@@ -197,7 +197,7 @@
 	  }
       }
 
-    g_base_info_unref ((GIBaseInfo *)field_info);
+    g_base_info_unref ((GIBaseInfo *)type_info);
 
     return result;
 }
@@ -389,7 +389,7 @@
 	  }
       }
 
-    g_base_info_unref ((GIBaseInfo *)field_info);
+    g_base_info_unref ((GIBaseInfo *)type_info);
 
     return result;
 }



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