diff options
author | Sven Eden <yamakuzure@gmx.net> | 2017-03-13 09:20:24 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 10:23:22 +0100 |
commit | d76bb3c179b7a32b109e39aa87ff09c8f5a8c178 (patch) | |
tree | 928f2ffcd363c0847053d5168d25a87c0a1606f5 /src/libelogind/sd-bus/bus-creds.c | |
parent | a56317566353ab14adc5f68da93af51d880b6ffd (diff) |
Unifiy free() usage
This commit substitutes all occurrences of
free(foo);
foo = NULL;
with
foo = mfree(foo);
Diffstat (limited to 'src/libelogind/sd-bus/bus-creds.c')
-rw-r--r-- | src/libelogind/sd-bus/bus-creds.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libelogind/sd-bus/bus-creds.c b/src/libelogind/sd-bus/bus-creds.c index 7c763a2e7..4fccae503 100644 --- a/src/libelogind/sd-bus/bus-creds.c +++ b/src/libelogind/sd-bus/bus-creds.c @@ -107,8 +107,7 @@ _public_ sd_bus_creds *sd_bus_creds_unref(sd_bus_creds *c) { free(c->cgroup_root); free(c->description); - free(c->supplementary_gids); - c->supplementary_gids = NULL; + c->supplementary_gids = mfree(c->supplementary_gids); strv_free(c->well_known_names); c->well_known_names = NULL; @@ -1049,8 +1048,7 @@ int bus_creds_add_more(sd_bus_creds *c, uint64_t mask, pid_t pid, pid_t tid) { return r; } else { if (c->cmdline_size == 0) { - free(c->cmdline); - c->cmdline = NULL; + c->cmdline = mfree(c->cmdline); } c->mask |= SD_BUS_CREDS_CMDLINE; |