diff options
author | Gian Mario Tagliaretti <gianmt@src.gnome.org> | 2009-02-08 19:18:48 +0000 |
---|---|---|
committer | Gian Mario Tagliaretti <gianmt@src.gnome.org> | 2009-02-08 19:18:48 +0000 |
commit | 8392f3d238484832a5d73a4602aad31f83a08f62 (patch) | |
tree | 15e34d4e120b98d05216b2fab501c30bb50ac190 /gobject/pygtype.c | |
parent | 951050a809d4368ed6fba283feffca0e7f6d8607 (diff) | |
download | pygobject-8392f3d238484832a5d73a4602aad31f83a08f62.tar.gz |
huge patch to fix memory leaks all over the place, fixes #568427
svn path=/trunk/; revision=1002
Diffstat (limited to 'gobject/pygtype.c')
-rw-r--r-- | gobject/pygtype.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gobject/pygtype.c b/gobject/pygtype.c index b12133dc..a5eb545c 100644 --- a/gobject/pygtype.c +++ b/gobject/pygtype.c @@ -87,7 +87,7 @@ static PyObject * _wrap_g_type_wrapper__get_name(PyGTypeWrapper *self, void *closure) { const char *name = g_type_name(self->type); - return _PyUnicode_FromString(g_strdup(name ? name : "invalid")); + return _PyUnicode_FromString(name ? name : "invalid"); } static PyObject * @@ -860,6 +860,7 @@ pyg_value_from_pyobject(GValue *value, PyObject *obj) return -1; string = g_string_new_len(buffer, len); g_value_set_boxed(value, string); + g_string_free (string, TRUE); break; } else if ((bm = pyg_type_lookup(G_VALUE_TYPE(value))) != NULL) |