diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-08-09 20:54:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:29:25 -0500 |
commit | b87c0dde7123b7598b49a236a76641846b885bf5 (patch) | |
tree | 49f9fd7d13e433d69580d6babb457c50dea0710c | |
parent | c7b9f06647c1a18bdc42a0815696826304bb2c0a (diff) | |
download | samba-b87c0dde7123b7598b49a236a76641846b885bf5.tar.gz samba-b87c0dde7123b7598b49a236a76641846b885bf5.tar.bz2 samba-b87c0dde7123b7598b49a236a76641846b885bf5.zip |
r24291: Fix Coverity ID 364
We've checked num_rids != 0 above.
(This used to be commit dab5449f385248ab1fdd60b240ef6ad4a27ba7f2)
-rw-r--r-- | source3/rpc_parse/parse_samr.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index 48844c2f53..90f1a2243b 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -4993,18 +4993,10 @@ NTSTATUS init_samr_r_lookup_names(TALLOC_CTX *ctx, SAMR_R_LOOKUP_NAMES * r_u, r_u->ptr_rids = 1; r_u->num_rids2 = num_rids; - if (num_rids) { - if (!(r_u->rids = TALLOC_ZERO_ARRAY(ctx, uint32, num_rids))) - return NT_STATUS_NO_MEMORY; - if (!(r_u->types = TALLOC_ZERO_ARRAY(ctx, uint32, num_rids))) - return NT_STATUS_NO_MEMORY; - } else { - r_u->rids = NULL; - r_u->types = NULL; - } - - if (!r_u->rids || !r_u->types) - goto empty; + if (!(r_u->rids = TALLOC_ZERO_ARRAY(ctx, uint32, num_rids))) + return NT_STATUS_NO_MEMORY; + if (!(r_u->types = TALLOC_ZERO_ARRAY(ctx, uint32, num_rids))) + return NT_STATUS_NO_MEMORY; for (i = 0; i < num_rids; i++) { r_u->rids[i] = rid[i]; @@ -5012,7 +5004,6 @@ NTSTATUS init_samr_r_lookup_names(TALLOC_CTX *ctx, SAMR_R_LOOKUP_NAMES * r_u, } } else { - empty: r_u->num_types1 = 0; r_u->ptr_types = 0; r_u->num_types2 = 0; |