From 1d4fe78db928c5f68aa805d1f5dc6a941fbb10fc Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 4 Sep 2012 15:19:46 +0200 Subject: [PATCH] s3: in sys_popen(), untangle assigment from check and add a debug message in failure case --- source3/lib/system.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/lib/system.c b/source3/lib/system.c index 30f2ac6d008..94603305370 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); -- 2.11.4.GIT