]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
2005-07-05 Colin Walters <walters@verbum.org>
authorColin Walters <walters@verbum.org>
Tue, 5 Jul 2005 16:39:56 +0000 (16:39 +0000)
committerColin Walters <walters@verbum.org>
Tue, 5 Jul 2005 16:39:56 +0000 (16:39 +0000)
* glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
Remove value refcount leak, original patch from Jorn Baayen
<jorn@openedhand.com>.  Also remove useless extra value in favor
of prepending to value array directly.

ChangeLog
glib/dbus-gproxy.c

index 18bfe63a4a16ead4111002c00232f78c37408adc..4bd49240e93e94900e01821b5c625c71595cf892 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-07-05  Colin Walters  <walters@verbum.org>
+
+       * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
+       Remove value refcount leak, original patch from Jorn Baayen
+       <jorn@openedhand.com>.  Also remove useless extra value in favor
+       of prepending to value array directly.
+
 2005-07-02  Colin Walters  <walters@verbum.org>
 
        * glib/dbus-gmain.c (_dbus_gmain_test): Fix test.
index 91cda82f8ea668b52dde188da4c203575aacd807..1a7292decd3d8d90aca15159cca7912a6d0f0b83 100644 (file)
@@ -1404,7 +1404,6 @@ marshal_dbus_message_to_g_marshaller (GClosure     *closure,
    */
 #define MAX_SIGNATURE_ARGS 20
   GValueArray *value_array;
-  GValue value = {0, };
   GSignalCMarshaller c_marshaller;
   DBusGProxy *proxy;
   DBusMessage *message;
@@ -1439,9 +1438,9 @@ marshal_dbus_message_to_g_marshaller (GClosure     *closure,
   if (value_array == NULL)
     return;
   
-  g_value_init (&value, G_TYPE_FROM_INSTANCE (proxy));
-  g_value_set_instance (&value, proxy);
-  g_value_array_prepend (value_array, &value);
+  g_value_array_prepend (value_array, NULL);
+  g_value_init (g_value_array_get_nth (value_array, 0), G_TYPE_FROM_INSTANCE (proxy));
+  g_value_set_instance (g_value_array_get_nth (value_array, 0), proxy);
 
   (* c_marshaller) (closure, return_value, value_array->n_values,
                    value_array->values, invocation_hint, marshal_data);