]> git.ipfire.org Git - thirdparty/systemd.git/commit
tree-wide: whenever we allocate a new bus object, close it before dropping final ref
authorLennart Poettering <lennart@poettering.net>
Thu, 17 Jan 2019 15:07:22 +0000 (16:07 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 17 Jan 2019 15:12:38 +0000 (16:12 +0100)
commitb1a4981aed3f5e939dbe5a211ca066ac69699b24
tree5a10bed0f53a36fae9cda6962ea28543fbc2fd99
parentaae82d1a36e01bf7efdaa51ec1c12664fef6db04
tree-wide: whenever we allocate a new bus object, close it before dropping final ref

This doesn't really change much, but feels more correct to do, as it
ensures that all messages currently queued in the bus connections are
definitely unreffed and thus destryoing of the connection object will
follow immediately.

Strictly speaking this change is entirely unnecessary, since nothing
else could have acquired a ref to the connection and queued a message
in, however, now that we have the new sd_bus_close_unref() helper it
makes a lot of sense to use it here, to ensure that whatever happens
nothing that might have been queued fucks with us.
src/busctl/busctl.c
src/core/dbus.c
src/machine/machine-dbus.c
src/shared/bus-util.c