summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-09-04 15:19:46 +0200
committerMichael Adam <obnox@samba.org>2012-09-04 20:39:20 +0200
commit1d4fe78db928c5f68aa805d1f5dc6a941fbb10fc (patch)
treec926145a3cd84534cdfd79cbe96f2b97a68e7020 /source3/lib
parentd43c411fb19707f1b57177e9a3300573018cc849 (diff)
downloadsamba-1d4fe78db928c5f68aa805d1f5dc6a941fbb10fc.tar.gz
samba-1d4fe78db928c5f68aa805d1f5dc6a941fbb10fc.tar.bz2
samba-1d4fe78db928c5f68aa805d1f5dc6a941fbb10fc.zip
s3: in sys_popen(), untangle assigment from check and add a debug message in failure case
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/system.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 30f2ac6d00..9460330537 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1176,8 +1176,11 @@ int sys_popen(const char *command)
parent_end = pipe_fds[0];
child_end = pipe_fds[1];
- if((entry = SMB_MALLOC_P(popen_list)) == NULL)
+ entry = SMB_MALLOC_P(popen_list);
+ if (entry == NULL) {
+ DEBUG(0, ("sys_popen: malloc failed\n"));
goto err_exit;
+ }
ZERO_STRUCTP(entry);