summaryrefslogtreecommitdiff
path: root/src/rexec.c
diff options
context:
space:
mode:
authorDennis Camera <skonfig@dtnr.ch>2022-08-25 22:20:37 +0200
committerDennis Camera <skonfig@dtnr.ch>2022-08-25 22:20:37 +0200
commita0c93a83de4f7a40d7d09607f4cc15cef34b77d0 (patch)
treec98bd3adfb45d2d039a8342e78739a473fd08388 /src/rexec.c
parenta62828595b9865a13cdc9b4adba3e3aaa9bc8e73 (diff)
downloadskonfig-c-a0c93a83de4f7a40d7d09607f4cc15cef34b77d0.tar.gz
skonfig-c-a0c93a83de4f7a40d7d09607f4cc15cef34b77d0.zip
...and the fixes for new compile errors :-)
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);