diff options
author | Simo Sorce <idra@samba.org> | 2009-02-24 16:36:16 -0500 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2009-02-24 16:50:08 -0500 |
commit | 57df88bb0b4ce656855410a8c2969d93475c2f11 (patch) | |
tree | 644bf0ce008c446efc27cf369d18a248da5ae7b4 /server/infopipe/sysbus.c | |
parent | 3621d86ad205dcacb50022f8e6b669218600257f (diff) | |
download | sssd-57df88bb0b4ce656855410a8c2969d93475c2f11.tar.gz sssd-57df88bb0b4ce656855410a8c2969d93475c2f11.tar.xz sssd-57df88bb0b4ce656855410a8c2969d93475c2f11.zip |
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()
Diffstat (limited to 'server/infopipe/sysbus.c')
-rw-r--r-- | server/infopipe/sysbus.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |