dbus/glib dbus-gproxy.c,1.33,1.34

Colin Walters walters at freedesktop.org
Tue Jul 5 09:40:04 PDT 2005


Update of /cvs/dbus/dbus/glib
In directory gabe:/tmp/cvs-serv19316/glib

Modified Files:
	dbus-gproxy.c 
Log Message:
2005-07-05  Colin Walters  <walters at verbum.org>

	* glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
	Remove value refcount leak, original patch from Jorn Baayen
	<jorn at openedhand.com>.  Also remove useless extra value in favor
	of prepending to value array directly.


Index: dbus-gproxy.c
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gproxy.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- dbus-gproxy.c	30 Jun 2005 18:22:10 -0000	1.33
+++ dbus-gproxy.c	5 Jul 2005 16:39:56 -0000	1.34
@@ -1404,7 +1404,6 @@
    */
 #define MAX_SIGNATURE_ARGS 20
   GValueArray *value_array;
-  GValue value = {0, };
   GSignalCMarshaller c_marshaller;
   DBusGProxy *proxy;
   DBusMessage *message;
@@ -1439,9 +1438,9 @@
   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);



More information about the dbus-commit mailing list