tree-wide: convert some more mfree() candidates
This commit is contained in:
parent
9317cbecf8
commit
0da1624818
|
@ -826,14 +826,12 @@ int cg_install_release_agent(const char *controller, const char *agent) {
|
||||||
} else if (!streq(sc, agent))
|
} else if (!streq(sc, agent))
|
||||||
return -EEXIST;
|
return -EEXIST;
|
||||||
|
|
||||||
free(fs);
|
fs = mfree(fs);
|
||||||
fs = NULL;
|
|
||||||
r = cg_get_path(controller, NULL, "notify_on_release", &fs);
|
r = cg_get_path(controller, NULL, "notify_on_release", &fs);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
free(contents);
|
contents = mfree(contents);
|
||||||
contents = NULL;
|
|
||||||
r = read_one_line_file(fs, &contents);
|
r = read_one_line_file(fs, &contents);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
@ -865,8 +863,7 @@ int cg_uninstall_release_agent(const char *controller) {
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
free(fs);
|
fs = mfree(fs);
|
||||||
fs = NULL;
|
|
||||||
|
|
||||||
r = cg_get_path(controller, NULL, "release_agent", &fs);
|
r = cg_get_path(controller, NULL, "release_agent", &fs);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
|
|
@ -763,8 +763,7 @@ static int parse_argv(int argc, char *argv[]) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ARG_ROOT_PASSWORD_FILE:
|
case ARG_ROOT_PASSWORD_FILE:
|
||||||
free(arg_root_password);
|
arg_root_password = mfree(arg_root_password);
|
||||||
arg_root_password = NULL;
|
|
||||||
|
|
||||||
r = read_one_line_file(optarg, &arg_root_password);
|
r = read_one_line_file(optarg, &arg_root_password);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
|
Loading…
Reference in a new issue