nspawn: add missing OOM check on gethostname_malloc()
This commit is contained in:
committed by
Lennart Poettering
parent
2978e540e4
commit
710dcce13f
+4
-2
@@ -3049,9 +3049,11 @@ static int determine_names(void) {
|
||||
}
|
||||
|
||||
if (!arg_machine) {
|
||||
if (arg_directory && path_equal(arg_directory, "/"))
|
||||
if (arg_directory && path_equal(arg_directory, "/")) {
|
||||
arg_machine = gethostname_malloc();
|
||||
else if (arg_image) {
|
||||
if (!arg_machine)
|
||||
return log_oom();
|
||||
} else if (arg_image) {
|
||||
char *e;
|
||||
|
||||
r = path_extract_filename(arg_image, &arg_machine);
|
||||
|
||||
Reference in New Issue
Block a user