s3: in sys_popen(), untangle assigment from check and add a debug message in failure...
[kai/samba.git] / source3 / lib / system.c
index 30f2ac6d008be79fee079015c55549e6773b1bce..94603305370a96bb98e8520a975ddadbe6ffeb6a 100644 (file)
@@ -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);