From 751ea167812fd730f6f79f55cfd02efe3a55aaf7 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Tue, 12 Feb 2002 11:10:51 +0000 Subject: Fix a leak 2002-02-12 Johan Dahlin * gobjectmodule.c (initgobject): Fix a leak * gtk/gtkmodule.c (init_gtk): Fix another one --- gobject/gobjectmodule.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index 5b62189..e13ccdb 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -1401,8 +1401,9 @@ initgobject(void) /* for addon libraries ... */ PyDict_SetItemString(d, "_PyGObject_API", - PyCObject_FromVoidPtr(&pygobject_api_functions,NULL)); - + o=PyCObject_FromVoidPtr(&pygobject_api_functions,NULL)); + Py_DECREF(o); + /* some constants */ PyModule_AddIntConstant(m, "SIGNAL_RUN_FIRST", G_SIGNAL_RUN_FIRST); PyModule_AddIntConstant(m, "SIGNAL_RUN_LAST", G_SIGNAL_RUN_LAST); -- cgit