projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4e9809
)
firstboot: clean-up the copied hostname, not argv[] directly, as that's ugly
author
Lennart Poettering
<lennart@poettering.net>
Fri, 11 Dec 2020 15:44:04 +0000
(16:44 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 15 Dec 2020 17:00:02 +0000
(18:00 +0100)
src/firstboot/firstboot.c
patch
|
blob
|
history
diff --git
a/src/firstboot/firstboot.c
b/src/firstboot/firstboot.c
index 48baae3f89a133ea855bd07da3652c68dbafaafc..afead11b42b0e9e034f5ab5d4082fb4e2127ea68 100644
(file)
--- a/
src/firstboot/firstboot.c
+++ b/
src/firstboot/firstboot.c
@@
-1139,11
+1139,11
@@
static int parse_argv(int argc, char *argv[]) {
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Host name %s is not valid.", optarg);
- hostname_cleanup(optarg);
r = free_and_strdup(&arg_hostname, optarg);
if (r < 0)
return log_oom();
+ hostname_cleanup(arg_hostname);
break;
case ARG_MACHINE_ID: