diff options
author | Robert McQueen <robot101@debian.org> | 2006-04-28 20:36:56 +0000 |
---|---|---|
committer | Robert McQueen <robot101@debian.org> | 2006-04-28 20:36:56 +0000 |
commit | 6055e1cf44ffc03a1e338c0aa45ef22d1dd7ad1c (patch) | |
tree | c3b67ab52bcfe07f2f0b1d88ad5c80a32d34299e /glib | |
parent | 9d7ef062bef32499c8d2ebfbdcced04dfa5fc191 (diff) |
2005-04-28 Robert McQueen <robot101@debian.org>
* glib/dbus-gvalue.c: Patch from Jakub Stachowski to fix a leak in
generating struct signatures. Fixes bug #6083.
Diffstat (limited to 'glib')
-rw-r--r-- | glib/dbus-gvalue.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/glib/dbus-gvalue.c b/glib/dbus-gvalue.c index e06a8fee..b81b4a65 100644 --- a/glib/dbus-gvalue.c +++ b/glib/dbus-gvalue.c @@ -392,10 +392,13 @@ _dbus_gtype_to_signature (GType gtype) size = dbus_g_type_get_struct_size (gtype); sig = g_string_sized_new (size+2); /*some sensible starting size*/ g_string_assign (sig, DBUS_STRUCT_BEGIN_CHAR_AS_STRING); - for (i=0; i < size; i++) + for (i = 0; i < size; i++) { - g_string_append (sig, _dbus_gtype_to_signature ( - dbus_g_type_get_struct_member_type (gtype, i))); + gchar *subsig; + subsig = _dbus_gtype_to_signature ( + dbus_g_type_get_struct_member_type (gtype, i)); + g_string_append (sig, subsig); + g_free (subsig); } g_string_append (sig, DBUS_STRUCT_END_CHAR_AS_STRING); ret = g_string_free (sig, FALSE); |