[pygi] fix leak in the allow None callbacks patch



commit a8668694da59c2dd959c875f13337e64ca22f7e9
Author: John (J5) Palmieri <johnp redhat com>
Date:   Mon Jun 14 13:43:53 2010 -0400

    fix leak in the allow None callbacks patch

 gi/pygi-callbacks.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/pygi-callbacks.c b/gi/pygi-callbacks.c
index a12eaed..868f2fb 100644
--- a/gi/pygi-callbacks.c
+++ b/gi/pygi-callbacks.c
@@ -190,7 +190,7 @@ _pygi_create_callback (GIBaseInfo  *function_info,
             /* if we allow none then set the closure to NULL and return */
             if (allow_none && py_function == Py_None) {
                 *closure_out = NULL;
-                return TRUE;
+                goto out;
             }
             found_py_function = TRUE;
         } else if (i == user_data_index) {
@@ -215,7 +215,7 @@ _pygi_create_callback (GIBaseInfo  *function_info,
                                                g_arg_info_get_scope (callback_arg),
                                                py_function,
                                                py_user_data);
-
+out:
     g_base_info_unref ( (GIBaseInfo*) callback_info);
     g_base_info_unref ( (GIBaseInfo*) callback_type);
 



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