From 4b5baf75147d66075ddbd6aa1382ce2802b7d621 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 19 Dec 2023 19:10:36 +0100 Subject: [PATCH] run: arg_service_type is not supposed to be allocated from heap --- src/run/run.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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; } -- 2.47.3