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);
This commit is contained in:
David Herrmann
2015-07-31 19:56:38 +02:00
parent b2a0ac5e5b
commit 97b11eedff
25 changed files with 64 additions and 119 deletions
+1 -2
View File
@@ -333,8 +333,7 @@ int config_parse(const char *unit,
return -ENOMEM;
}
free(continuation);
continuation = NULL;
continuation = mfree(continuation);
p = c;
} else
p = l;