diff options
author | Daniel Lockyer <thisisdaniellockyer@gmail.com> | 2017-11-24 10:33:41 +0000 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-11-24 10:33:41 +0000 |
commit | c9c55544e20de9ed65a2292e634bd340e68675e4 (patch) | |
tree | 42af5334865ab85c68f803ae58e195ab0b540b3e /src | |
parent | 7638de02c66265741bb64037d04f7f53759a564c (diff) |
Replace free and reassignment with free_and_replace
Diffstat (limited to 'src')
-rw-r--r-- | src/libelogind/sd-bus/sd-bus.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libelogind/sd-bus/sd-bus.c b/src/libelogind/sd-bus/sd-bus.c index b180fab33..c305e8c37 100644 --- a/src/libelogind/sd-bus/sd-bus.c +++ b/src/libelogind/sd-bus/sd-bus.c @@ -790,9 +790,7 @@ static int parse_container_unix_address(sd_bus *b, const char **p, char **guid) if (!machine_name_is_valid(machine)) return -EINVAL; - free(b->machine); - b->machine = machine; - machine = NULL; + free_and_replace(b->machine, machine); } else { b->machine = mfree(b->machine); } |