mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
ndr: maintain proper talloc tree in pull_string_array
We don't want to leave other parts of the ndr struct hanging off this string array just because LIBNDR_FLAG_REMAINING is used. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
326bc84c0d
commit
9bf331b46a
@ -380,12 +380,12 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string_array(struct ndr_pull *ndr, int ndr_f
|
||||
tmp_ctx = ndr->current_mem_ctx;
|
||||
ndr->current_mem_ctx = a;
|
||||
NDR_CHECK(ndr_pull_string(ndr, ndr_flags, &s));
|
||||
ndr->current_mem_ctx = tmp_ctx;
|
||||
if ((ndr->data_size - ndr->offset) == 0 && ndr->flags & LIBNDR_FLAG_REMAINING)
|
||||
{
|
||||
a[count] = s;
|
||||
break;
|
||||
}
|
||||
ndr->current_mem_ctx = tmp_ctx;
|
||||
if (strcmp("", s)==0) {
|
||||
a[count] = NULL;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user