mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
s3-rpc_client: Use the right memory context for array elements.
This commit is contained in:
@ -225,7 +225,7 @@ static NTSTATUS rpccli_lsa_lookup_sids_noalloc(struct rpc_pipe_client *cli,
|
|||||||
name = lsa_names.names[i].name.string;
|
name = lsa_names.names[i].name.string;
|
||||||
|
|
||||||
if (name) {
|
if (name) {
|
||||||
(names)[i] = talloc_strdup(mem_ctx, name);
|
(names)[i] = talloc_strdup(names, name);
|
||||||
if ((names)[i] == NULL) {
|
if ((names)[i] == NULL) {
|
||||||
DEBUG(0, ("cli_lsa_lookup_sids_noalloc(): out of memory\n"));
|
DEBUG(0, ("cli_lsa_lookup_sids_noalloc(): out of memory\n"));
|
||||||
result = NT_STATUS_UNSUCCESSFUL;
|
result = NT_STATUS_UNSUCCESSFUL;
|
||||||
@ -234,8 +234,8 @@ static NTSTATUS rpccli_lsa_lookup_sids_noalloc(struct rpc_pipe_client *cli,
|
|||||||
} else {
|
} else {
|
||||||
(names)[i] = NULL;
|
(names)[i] = NULL;
|
||||||
}
|
}
|
||||||
domains[i] = talloc_strdup(
|
domains[i] = talloc_strdup(domains,
|
||||||
mem_ctx, dom_name ? dom_name : "");
|
dom_name ? dom_name : "");
|
||||||
(types)[i] = lsa_names.names[i].sid_type;
|
(types)[i] = lsa_names.names[i].sid_type;
|
||||||
if (((domains)[i] == NULL)) {
|
if (((domains)[i] == NULL)) {
|
||||||
DEBUG(0, ("cli_lsa_lookup_sids_noalloc(): out of memory\n"));
|
DEBUG(0, ("cli_lsa_lookup_sids_noalloc(): out of memory\n"));
|
||||||
|
Reference in New Issue
Block a user