core/execute: only clean the environment, if we have one

This commit is contained in:
Harald Hoyer 2013-04-18 07:15:03 +02:00
parent 14787e6499
commit 5521d69856

View file

@ -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;