r17439: Fix logic error in checking TALLOC return. Spotted by Volker.
authorJeremy Allison <jra@samba.org>
Mon, 7 Aug 2006 15:41:43 +0000 (15:41 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:38:33 +0000 (11:38 -0500)
Jeremy.
(This used to be commit 06aea05c52ee770a2dd6465e9e2fcd0ccd8c811d)

source3/rpc_server/srv_samr_nt.c

index ec3630ec26a989ebf37dd9297163e400d713548a..31e434cbfb1cf7b48f7ad505e7083c51d5f55043 100644 (file)
@@ -1645,7 +1645,7 @@ NTSTATUS _samr_lookup_rids(pipes_struct *p, SAMR_Q_LOOKUP_RIDS *q_u, SAMR_R_LOOK
        attrs = TALLOC_ZERO_ARRAY(p->mem_ctx, enum SID_NAME_USE, num_rids);
        wire_attrs = TALLOC_ZERO_ARRAY(p->mem_ctx, uint32, num_rids);
 
-       if ((num_rids != 0) && ((names == NULL) || (attrs == NULL) || wire_attrs))
+       if ((num_rids != 0) && ((names == NULL) || (attrs == NULL) || (wire_attrs==NULL)))
                return NT_STATUS_NO_MEMORY;
 
        become_root();  /* lookup_sid can require root privs */