diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-07-31 19:56:38 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-07-31 19:56:38 +0200 |
commit | 97b11eedff9d2e17101ad453caf9e48b73246719 (patch) | |
tree | add86c36a039f2cbeb8232908c7a0cb3ca784ea5 /src/libsystemd/sd-bus/bus-match.c | |
parent | bus-proxy: allow empty arguments to UpdateActivationEnvironment() (diff) | |
download | systemd-97b11eedff9d2e17101ad453caf9e48b73246719.tar.xz systemd-97b11eedff9d2e17101ad453caf9e48b73246719.zip |
tree-wide: introduce mfree()
Pretty trivial helper which wraps free() but returns NULL, so we can
simplify this:
free(foobar);
foobar = NULL;
to this:
foobar = mfree(foobar);
Diffstat (limited to 'src/libsystemd/sd-bus/bus-match.c')
-rw-r--r-- | src/libsystemd/sd-bus/bus-match.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libsystemd/sd-bus/bus-match.c b/src/libsystemd/sd-bus/bus-match.c index e4cbd793ed..18c36ce243 100644 --- a/src/libsystemd/sd-bus/bus-match.c +++ b/src/libsystemd/sd-bus/bus-match.c @@ -861,8 +861,7 @@ int bus_match_parse( if (r < 0) goto fail; - free(value); - value = NULL; + value = mfree(value); } else u = 0; |