From 57df88bb0b4ce656855410a8c2969d93475c2f11 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 24 Feb 2009 16:36:16 -0500 Subject: Proper fix for memory handling problem. sbus_message_handler is not responsible anymore for sending back data in any case. Transfer this responsibility to the handler function called. This way both synchronous and asynchronous funstions use the interface the same way and can properly free memory referenced by the reply after the send buffer has been filled in and all copies are done in sbus_conn_send_reply() --- server/infopipe/sysbus.c | 1 + 1 file changed, 1 insertion(+) (limited to 'server/infopipe/sysbus.c') diff --git a/server/infopipe/sysbus.c b/server/infopipe/sysbus.c index a6b352fa4..5c272e664 100644 --- a/server/infopipe/sysbus.c +++ b/server/infopipe/sysbus.c @@ -125,6 +125,7 @@ int sysbus_init(TALLOC_CTX *mem_ctx, struct sysbus_ctx **sysbus, if (ret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { /* We were unable to register on the system bus */ DEBUG(0, ("Unable to request name on the system bus. Error: %s\n", dbus_error.message)); + if (dbus_error_is_set(&dbus_error)) dbus_error_free(&dbus_error); talloc_free(system_bus); return EIO; } -- cgit