diff options
author | Jeremy Allison <jra@samba.org> | 2007-04-30 02:39:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:49 -0500 |
commit | 8968808c3b5b0208cbad9ac92eaf948f2c546dd9 (patch) | |
tree | 26d539cf26e3ca30d5ead10c6b9257134783024a /source/rpc_client/cli_samr.c | |
parent | 8ad13718af0ba1fcb10a6f1631b1ed3cb8d11175 (diff) | |
download | samba-8968808c3b5b0208cbad9ac92eaf948f2c546dd9.tar.gz samba-8968808c3b5b0208cbad9ac92eaf948f2c546dd9.tar.xz samba-8968808c3b5b0208cbad9ac92eaf948f2c546dd9.zip |
r22589: Make TALLOC_ARRAY consistent across all uses.
Jeremy.
Diffstat (limited to 'source/rpc_client/cli_samr.c')
-rw-r--r-- | source/rpc_client/cli_samr.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/rpc_client/cli_samr.c b/source/rpc_client/cli_samr.c index 593b0f385ba..462add43819 100644 --- a/source/rpc_client/cli_samr.c +++ b/source/rpc_client/cli_samr.c @@ -536,10 +536,14 @@ NTSTATUS rpccli_samr_query_useraliases(struct rpc_pipe_client *cli, ZERO_STRUCT(q); ZERO_STRUCT(r); - sid_ptrs = TALLOC_ARRAY(mem_ctx, uint32, num_sids); - if (sid_ptrs == NULL) - return NT_STATUS_NO_MEMORY; - + if (num_sids) { + sid_ptrs = TALLOC_ARRAY(mem_ctx, uint32, num_sids); + if (sid_ptrs == NULL) + return NT_STATUS_NO_MEMORY; + } else { + sid_ptrs = NULL; + } + for (i=0; i<num_sids; i++) sid_ptrs[i] = 1; |