From: Lennart Poettering Date: Fri, 11 Dec 2020 15:44:04 +0000 (+0100) Subject: firstboot: clean-up the copied hostname, not argv[] directly, as that's ugly X-Git-Tag: v248-rc1~499^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79485fc27a5b18ac8957960eaccbc8a960e1bd64;p=thirdparty%2Fsystemd.git firstboot: clean-up the copied hostname, not argv[] directly, as that's ugly --- diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index 48baae3f89a..afead11b42b 100644 --- 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: