summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/execute.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index aad11c94aa..26cde24f15 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;