firstboot: fix crash when hostname question is skipped

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2025-01-30 19:48:43 +01:00
committed by Mike Yuan
parent 30675a6ee9
commit b66a4c157e
+3 -1
View File
@@ -634,7 +634,9 @@ static int prompt_hostname(int rfd) {
if (r < 0)
return r;
hostname_cleanup(arg_hostname);
if (arg_hostname)
hostname_cleanup(arg_hostname);
return 0;
}