1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-30 17:18:08 +03:00

run: arg_service_type is not supposed to be allocated from heap

This commit is contained in:
Lennart Poettering 2023-12-19 19:10:36 +01:00
parent 97e52d62fb
commit 4b5baf7514

View File

@ -556,11 +556,8 @@ static int parse_argv(int argc, char *argv[]) {
return log_error_errno(r, "Failed to get current working directory: %m");
}
if (!arg_service_type) {
arg_service_type = strdup("exec");
if (!arg_service_type)
return log_oom();
}
if (!arg_service_type)
arg_service_type = "exec";
arg_wait = true;
}