Simplify the code a bit, at the cost of potentially duplicating some
memory unneccessarily.
Fixes CID 1299641.
NULL
};
- char **env_use;
+ _cleanup_strv_free_ char **env_use = NULL;
int r;
assert(barrier);
return log_oom();
}
- if (!strv_isempty(arg_setenv)) {
- char **n;
-
- n = strv_env_merge(2, envp, arg_setenv);
- if (!n)
- return log_oom();
-
- env_use = n;
- } else
- env_use = (char**) envp;
+ env_use = strv_env_merge(2, envp, arg_setenv);
+ if (!env_use)
+ return log_oom();
/* Let the parent know that we are ready and
* wait until the parent is ready with the