summaryrefslogtreecommitdiff
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
commit0e0f310072abbf221e6101a5e666f8cff45f8f2d (patch)
tree963b75fae4914986e7e18ee9e01b4e1e9a0b3804
parentd2b5a9443eb9e6095530bcea2da6767642e797f7 (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.
-rw-r--r--ChangeLog5
-rw-r--r--glib/dbus-gvalue.c9
2 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0351e87..fdb65cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
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.
+
+2005-04-28 Robert McQueen <robot101@debian.org>
+
* qt/Makefile.am: Tweak CLEANFILES from qdbusconnection.moc
to qdbusconnection_p.moc.
diff --git a/glib/dbus-gvalue.c b/glib/dbus-gvalue.c
index e06a8fe..b81b4a6 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);