summaryrefslogtreecommitdiffstats
path: root/glib
diff options
context:
space:
mode:
authorRobert McQueen <robot101@debian.org>2006-04-28 20:36:56 +0000
committerRobert McQueen <robot101@debian.org>2006-04-28 20:36:56 +0000
commit6055e1cf44ffc03a1e338c0aa45ef22d1dd7ad1c (patch)
treec3b67ab52bcfe07f2f0b1d88ad5c80a32d34299e /glib
parent9d7ef062bef32499c8d2ebfbdcced04dfa5fc191 (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.c9
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);