summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2015-08-02 00:59:42 +0900
committerNamhyung Kim <namhyung@gmail.com>2015-08-02 23:12:08 +0900
commitba243e5155fd824dcd5235992e691017bd328b3f (patch)
tree9523cb0bce8b7a00569333cd407ed16cb39aaf5a
parent253f96e53eb98dd811d380ffe108c53f48765ad2 (diff)
sd-bus: cleanup bus_reset_parsed_address()
Both strv_free() and mfree() return NULL pointer after free.
-rw-r--r--src/libsystemd/sd-bus/sd-bus.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index e700168659..0f075907d5 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -902,15 +902,11 @@ static void bus_reset_parsed_address(sd_bus *b) {
zero(b->sockaddr);
b->sockaddr_size = 0;
- strv_free(b->exec_argv);
- free(b->exec_path);
- b->exec_path = NULL;
- b->exec_argv = NULL;
+ b->exec_argv = strv_free(b->exec_argv);
+ b->exec_path = mfree(b->exec_path);
b->server_id = SD_ID128_NULL;
- free(b->kernel);
- b->kernel = NULL;
- free(b->machine);
- b->machine = NULL;
+ b->kernel = mfree(b->kernel);
+ b->machine = mfree(b->machine);
b->nspid = 0;
}