chiark / gitweb /
core/execute: only clean the environment, if we have one
authorHarald Hoyer <harald@redhat.com>
Thu, 18 Apr 2013 05:15:03 +0000 (07:15 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 18 Apr 2013 05:16:01 +0000 (07:16 +0200)
src/core/execute.c

index aad11c9..26cde24 100644 (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;