]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-bus: fix memleak 18212/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 12 Jan 2021 11:46:44 +0000 (20:46 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 12 Jan 2021 11:46:47 +0000 (20:46 +0900)
Closes CID#1437780.

src/libsystemd/sd-bus/sd-bus.c

index e9bc19d96a9696776430d0ba66afbf6cf71d426e..857193943a7e152992ce02ed3c835feac70f1811 100644 (file)
@@ -1516,8 +1516,8 @@ _public_ int sd_bus_open_system_remote(sd_bus **ret, const char *host) {
 }
 
 int bus_set_address_machine(sd_bus *b, bool user, const char *machine) {
+        _cleanup_free_ char *a = NULL;
         const char *rhs;
-        char *a;
 
         assert(b);
         assert(machine);