dbus/glib dbus-gobject.c,1.31,1.32
Colin Walters
walters at freedesktop.org
Mon Jun 20 12:54:24 PDT 2005
Update of /cvs/dbus/dbus/glib
In directory gabe:/tmp/cvs-serv18847/glib
Modified Files:
dbus-gobject.c
Log Message:
2005-06-20 Colin Walters <walters at verbum.org>
Patch suggested by Ross Burton <ross at openedhand.com>
* glib/dbus-gobject.c (export_signals): Free signal name.
(g_value_init): Use G_VALUE_NOCOPY_CONTENTS to plug
memory leak. Add a bit of documentation.
(dbus_g_method_return_error): Free context, and note we do
so.
Index: dbus-gobject.c
===================================================================
RCS file: /cvs/dbus/dbus/glib/dbus-gobject.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- dbus-gobject.c 19 Jun 2005 15:31:25 -0000 1.31
+++ dbus-gobject.c 20 Jun 2005 19:54:21 -0000 1.32
@@ -1245,6 +1245,7 @@
g_closure_add_finalize_notifier (closure, NULL,
dbus_g_signal_closure_finalize);
+ g_free (s);
}
}
@@ -1549,6 +1550,7 @@
/**
* Send a return message for a given method invocation, with arguments.
+ * This function also frees the sending context.
*
* @param context the method context
*/
@@ -1575,7 +1577,7 @@
char *error;
g_value_init (&value, g_array_index (argsig, GType, i));
error = NULL;
- G_VALUE_COLLECT (&value, args, 0, &error);
+ G_VALUE_COLLECT (&value, args, G_VALUE_NOCOPY_CONTENTS, &error);
if (error)
{
g_warning(error);
@@ -1595,6 +1597,7 @@
/**
* Send a error message for a given method invocation.
+ * This function also frees the sending context.
*
* @param context the method context
* @param error the error to send.
@@ -1606,6 +1609,7 @@
reply = gerror_to_dbus_error_message (context->object, dbus_g_message_get_message (context->message), error);
dbus_connection_send (dbus_g_connection_get_connection (context->connection), reply, NULL);
dbus_message_unref (reply);
+ g_free (context);
}
/** @} */ /* end of public API */
More information about the dbus-commit
mailing list