From a1e58e8ee1c84b633d6d6d651d5328d4dd4eba5b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 8 Sep 2015 18:43:11 +0200 Subject: tree-wide: use coccinelle to patch a lot of code to use mfree() This replaces this: free(p); p = NULL; by this: p = mfree(p); Change generated using coccinelle. Semantic patch is added to the sources. --- src/libsystemd/sd-bus/sd-bus.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/libsystemd/sd-bus/sd-bus.c') diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c index 4a9181613a..2ac4b9be8e 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -820,8 +820,7 @@ static int parse_container_unix_address(sd_bus *b, const char **p, char **guid) b->machine = machine; machine = NULL; } else { - free(b->machine); - b->machine = NULL; + b->machine = mfree(b->machine); } if (pid) { @@ -880,8 +879,7 @@ static int parse_container_kernel_address(sd_bus *b, const char **p, char **guid b->machine = machine; machine = NULL; } else { - free(b->machine); - b->machine = NULL; + b->machine = mfree(b->machine); } if (pid) { -- cgit v1.2.3