s3: in sys_popen(), untangle assigment from check and add a debug message in failure...
authorMichael Adam <obnox@samba.org>
Tue, 4 Sep 2012 13:19:46 +0000 (15:19 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 4 Sep 2012 18:39:20 +0000 (20:39 +0200)
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);