firstboot: clean-up the copied hostname, not argv[] directly, as that's ugly
This commit is contained in:
parent
d4e9809465
commit
79485fc27a
|
@ -1139,11 +1139,11 @@ static int parse_argv(int argc, char *argv[]) {
|
||||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||||
"Host name %s is not valid.", optarg);
|
"Host name %s is not valid.", optarg);
|
||||||
|
|
||||||
hostname_cleanup(optarg);
|
|
||||||
r = free_and_strdup(&arg_hostname, optarg);
|
r = free_and_strdup(&arg_hostname, optarg);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_oom();
|
return log_oom();
|
||||||
|
|
||||||
|
hostname_cleanup(arg_hostname);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ARG_MACHINE_ID:
|
case ARG_MACHINE_ID:
|
||||||
|
|
Loading…
Reference in a new issue