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 aad11c94aa4c6e883f1217c9229d9bb61e01c2be..26cde24f150de8e337bba53e01d4c2c1ed8a2ddb 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;