dbus/glib dbus-gtype-specialized.c,1.5,1.6
Rob McQueen
robot101 at kemper.freedesktop.org
Tue Jun 6 17:31:03 PDT 2006
Update of /cvs/dbus/dbus/glib
In directory kemper:/tmp/cvs-serv15341/glib
Modified Files:
dbus-gtype-specialized.c
Log Message:
2005-05-06 Robert McQueen <robot101 at debian.org>
* glib/dbus-gtype-specialized.c: Fix obvious leak of GArray in every
call to dbus_g_type_get_struct.
Index: dbus-gtype-specialized.c
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gtype-specialized.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- dbus-gtype-specialized.c 13 Feb 2006 22:30:11 -0000 1.5
+++ dbus-gtype-specialized.c 7 Jun 2006 00:31:01 -0000 1.6
@@ -392,7 +392,7 @@
...)
{
GArray *types;
- GType curtype;
+ GType curtype, ret;
va_list args;
va_start (args, first_type);
@@ -404,8 +404,13 @@
curtype = va_arg (args, GType);
}
va_end (args);
- return lookup_or_register_specialized (container, types->len, (GType*)types->data);
+ ret = lookup_or_register_specialized (container, types->len,
+ (GType *) types->data);
+
+ g_array_free (types, TRUE);
+
+ return ret;
}
More information about the dbus-commit
mailing list