From: Harald Hoyer Date: Thu, 18 Apr 2013 05:15:03 +0000 (+0200) Subject: core/execute: only clean the environment, if we have one X-Git-Tag: v202~18 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=5521d6985648669a65d0529bb01c7a32edc99294;p=elogind.git core/execute: only clean the environment, if we have one --- diff --git a/src/core/execute.c b/src/core/execute.c index aad11c94a..26cde24f1 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1772,7 +1772,8 @@ int exec_context_load_environment(const ExecContext *c, char ***l) { return k; } /* Log invalid environment variables with filename */ - p = strv_env_clean_log(p, pglob.gl_pathv[n]); + if (p) + p = strv_env_clean_log(p, pglob.gl_pathv[n]); if (r == NULL) r = p;