[pygobject] Plug another memory leak



commit 3887b030fc19d25e0cd7b4ed504f4ed23363c3d6
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Jan 16 22:09:56 2011 +0100

    Plug another memory leak
    
    Do not leak interface info in (g|s)_et_property.

 gi/pygi-property.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gi/pygi-property.c b/gi/pygi-property.c
index 7b6a508..5e2c6d6 100644
--- a/gi/pygi-property.c
+++ b/gi/pygi-property.c
@@ -155,6 +155,8 @@ pygi_get_property_value_real (PyGObject *instance,
             type = g_registered_type_info_get_g_type (info);
             info_type = g_base_info_get_type (info);
 
+            g_base_info_unref (info);
+
             switch (info_type) {
                 case GI_INFO_TYPE_ENUM:
                     arg.v_int32 = g_value_get_enum (&value);
@@ -261,6 +263,8 @@ pygi_set_property_value_real (PyGObject *instance,
             type = g_registered_type_info_get_g_type (info);
             info_type = g_base_info_get_type (info);
 
+            g_base_info_unref (info);
+
             switch (info_type) {
                 case GI_INFO_TYPE_ENUM:
                     g_value_set_enum (&value, arg.v_int32);



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