summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
Diffstat (limited to 'src/machine')
-rw-r--r--src/machine/machine.c3
-rw-r--r--src/machine/machinectl.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/machine/machine.c b/src/machine/machine.c
index a056ec3b08..b52ecd015c 100644
--- a/src/machine/machine.c
+++ b/src/machine/machine.c
@@ -600,8 +600,7 @@ void machine_release_unit(Machine *m) {
return;
(void) hashmap_remove(m->manager->machine_units, m->unit);
- free(m->unit);
- m->unit = NULL;
+ m->unit = mfree(m->unit);
}
static const char* const machine_class_table[_MACHINE_CLASS_MAX] = {
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index bb8c5ac64b..7b8f6d1fab 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -597,7 +597,7 @@ static void print_machine_status_info(sd_bus *bus, MachineStatusInfo *i) {
printf("\t Unit: %s\n", i->unit);
show_unit_cgroup(bus, i->unit, i->leader);
- if (arg_transport == BUS_TRANSPORT_LOCAL) {
+ if (arg_transport == BUS_TRANSPORT_LOCAL)
show_journal_by_unit(
stdout,
@@ -611,7 +611,6 @@ static void print_machine_status_info(sd_bus *bus, MachineStatusInfo *i) {
SD_JOURNAL_LOCAL_ONLY,
true,
NULL);
- }
}
}