From: Mike Yuan Date: Wed, 28 May 2025 19:05:53 +0000 (+0200) Subject: core: strv_env_clean() modifies in-place, no need to set buf to itself X-Git-Tag: v258-rc1~443^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94f533e305b52049bdb4dede7c777850478ae1eb;p=thirdparty%2Fsystemd.git core: strv_env_clean() modifies in-place, no need to set buf to itself --- diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c index 593c04ae5cb..e96a031c868 100644 --- a/src/core/exec-invoke.c +++ b/src/core/exec-invoke.c @@ -5254,7 +5254,7 @@ int exec_invoke( *exit_status = EXIT_MEMORY; return log_oom(); } - accum_env = strv_env_clean(accum_env); + strv_env_clean(accum_env); (void) umask(context->umask); diff --git a/src/core/execute.c b/src/core/execute.c index 8d961094730..2e5303987cb 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -934,7 +934,7 @@ static int exec_context_load_environment(const Unit *unit, const ExecContext *c, .path = *path, }; - p = strv_env_clean_with_callback(p, invalid_env, &info); + strv_env_clean_with_callback(p, invalid_env, &info); } if (!v)