+2005-06-20 Colin Walters <walters@verbum.org>
+
+ Patch suggested by Ross Burton <ross@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.
+
2005-06-18 Murray Cumming <murrayc@murrayc.com>
* dbus/dbus-glib.h:
g_closure_add_finalize_notifier (closure, NULL,
dbus_g_signal_closure_finalize);
+ g_free (s);
}
}
/**
* Send a return message for a given method invocation, with arguments.
+ * This function also frees the sending context.
*
* @param context the method context
*/
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);
/**
* 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.
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 */