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
+2 -4
View File
@@ -715,10 +715,8 @@ static int parse_argv(int argc, char *argv[]) {
path_kill_slashes(arg_root);
if (path_equal(arg_root, "/")) {
free(arg_root);
arg_root = NULL;
}
if (path_equal(arg_root, "/"))
arg_root = mfree(arg_root);
break;