summaryrefslogtreecommitdiff
path: root/src/machine/machine-dbus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-01-17 16:07:22 +0100
committerLennart Poettering <lennart@poettering.net>2019-01-17 16:12:38 +0100
commitb1a4981aed3f5e939dbe5a211ca066ac69699b24 (patch)
tree5a10bed0f53a36fae9cda6962ea28543fbc2fd99 /src/machine/machine-dbus.c
parentaae82d1a36e01bf7efdaa51ec1c12664fef6db04 (diff)
downloadsystemd-b1a4981aed3f5e939dbe5a211ca066ac69699b24.tar.gz
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.
Diffstat (limited to 'src/machine/machine-dbus.c')
-rw-r--r--src/machine/machine-dbus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
index 48270b3709..7a558df898 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
@@ -454,7 +454,7 @@ static int container_bus_new(Machine *m, sd_bus_error *error, sd_bus **ret) {
break;
case MACHINE_CONTAINER: {
- _cleanup_(sd_bus_unrefp) sd_bus *bus = NULL;
+ _cleanup_(sd_bus_close_unrefp) sd_bus *bus = NULL;
char *address;
r = sd_bus_new(&bus);