summaryrefslogtreecommitdiff
path: root/src/rexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rexec.c')
-rw-r--r--src/rexec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rexec.c b/src/rexec.c
index d55b8c3..0b67462 100644
--- a/src/rexec.c
+++ b/src/rexec.c
@@ -15,6 +15,11 @@ int sk_rexec_command(
int stdin, int stdout, int stderr, envp_t *const extra_envp) {
envp_t *envp = envp_dup();
+ if (NULL == envp) {
+ sk_error("failed to allocate memory for environment copy");
+ return -1;
+ }
+
/* FIXME: set actual values */
envp_set(envp, "__target_host", target_host, true);
envp_set(envp, "__target_fqdn", target_host, true);