summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/system.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 8c9c05f4de..ce55e83d58 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1161,17 +1161,17 @@ int sys_popen(const char *command)
char **argl = NULL;
int ret;
+ if (!*command) {
+ errno = EINVAL;
+ return -1;
+ }
+
if (pipe(pipe_fds) < 0)
return -1;
parent_end = pipe_fds[0];
child_end = pipe_fds[1];
- if (!*command) {
- errno = EINVAL;
- goto err_exit;
- }
-
if((entry = SMB_MALLOC_P(popen_list)) == NULL)
goto err_exit;