summaryrefslogtreecommitdiffstats
path: root/gobject/gobjectmodule.c
diff options
context:
space:
mode:
authorGian Mario Tagliaretti <gianmt@src.gnome.org>2009-02-08 19:18:48 +0000
committerGian Mario Tagliaretti <gianmt@src.gnome.org>2009-02-08 19:18:48 +0000
commit8392f3d238484832a5d73a4602aad31f83a08f62 (patch)
tree15e34d4e120b98d05216b2fab501c30bb50ac190 /gobject/gobjectmodule.c
parent951050a809d4368ed6fba283feffca0e7f6d8607 (diff)
downloadpygobject-8392f3d238484832a5d73a4602aad31f83a08f62.tar.gz
pygobject-8392f3d238484832a5d73a4602aad31f83a08f62.tar.xz
pygobject-8392f3d238484832a5d73a4602aad31f83a08f62.zip
huge patch to fix memory leaks all over the place, fixes #568427
svn path=/trunk/; revision=1002
Diffstat (limited to 'gobject/gobjectmodule.c')
-rw-r--r--gobject/gobjectmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
index 84a1071..ecc28f9 100644
--- a/gobject/gobjectmodule.c
+++ b/gobject/gobjectmodule.c
@@ -965,13 +965,14 @@ get_type_name_for_class(PyTypeObject *class)
gint i, name_serial;
char name_serial_str[16];
PyObject *module;
- char *type_name;
+ char *type_name = NULL;
/* make name for new GType */
name_serial = 1;
/* give up after 1000 tries, just in case.. */
while (name_serial < 1000)
{
+ g_free(type_name);
snprintf(name_serial_str, 16, "-v%i", name_serial);
module = PyObject_GetAttrString((PyObject *)class, "__module__");
if (module && _PyUnicode_Check(module)) {