diff options
Diffstat (limited to 'src/bus-proxyd/proxy.c')
-rw-r--r-- | src/bus-proxyd/proxy.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bus-proxyd/proxy.c b/src/bus-proxyd/proxy.c index c37b09b9c0..df361ac400 100644 --- a/src/bus-proxyd/proxy.c +++ b/src/bus-proxyd/proxy.c @@ -261,9 +261,18 @@ int proxy_new(Proxy **out, int in_fd, int out_fd, const char *destination) { } Proxy *proxy_free(Proxy *p) { + ProxyActivation *activation; + if (!p) return NULL; + while ((activation = p->activations)) { + LIST_REMOVE(activations_by_proxy, p->activations, activation); + sd_bus_message_unref(activation->request); + sd_bus_slot_unref(activation->slot); + free(activation); + } + sd_bus_flush_close_unref(p->local_bus); sd_bus_flush_close_unref(p->destination_bus); set_free_free(p->owned_names); @@ -644,6 +653,10 @@ static int process_hello(Proxy *p, sd_bus_message *m) { if (r < 0) return log_error_errno(r, "Failed to append sender to NameAcquired message: %m"); + r = sd_bus_message_set_destination(n, p->destination_bus->unique_name); + if (r < 0) + return log_error_errno(r, "Failed to set destination for NameAcquired message: %m"); + r = bus_seal_synthetic_message(p->local_bus, n); if (r < 0) return log_error_errno(r, "Failed to seal NameAcquired message: %m"); |