From a0c93a83de4f7a40d7d09607f4cc15cef34b77d0 Mon Sep 17 00:00:00 2001 From: Dennis Camera Date: Thu, 25 Aug 2022 22:20:37 +0200 Subject: ...and the fixes for new compile errors :-) --- src/rexec.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/rexec.c') 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); -- cgit v1.2.3