From: Lennart Poettering Date: Tue, 19 Dec 2023 18:10:36 +0000 (+0100) Subject: run: arg_service_type is not supposed to be allocated from heap X-Git-Tag: v256-rc1~1445^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b5baf75147d66075ddbd6aa1382ce2802b7d621;p=thirdparty%2Fsystemd.git run: arg_service_type is not supposed to be allocated from heap --- diff --git a/src/run/run.c b/src/run/run.c index 88eca0fd6d1..68fb82ad3e9 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -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; }