1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

samr4: Remove talloc_asprintf leak onto mem_ctx

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11751

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Garming Sam 2016-05-11 13:02:03 +12:00 committed by Garming Sam
parent 37ef959f37
commit e0acee0223

View File

@ -1525,7 +1525,7 @@ static NTSTATUS dcesrv_samr_GetAliasMembership(struct dcesrv_call_state *dce_cal
{
struct dcesrv_handle *h;
struct samr_domain_state *d_state;
const char *filter;
char *filter;
const char * const attrs[] = { "objectSid", NULL };
struct ldb_message **res;
uint32_t i;
@ -1549,8 +1549,8 @@ static NTSTATUS dcesrv_samr_GetAliasMembership(struct dcesrv_call_state *dce_cal
dom_sid_string_buf(r->in.sids->sids[i].sid,
membersidstr, sizeof(membersidstr));
filter = talloc_asprintf(mem_ctx, "%s(member=<SID=%s>)",
filter, membersidstr);
filter = talloc_asprintf_append(filter, "(member=<SID=%s>)",
membersidstr);
if (filter == NULL) {
return NT_STATUS_NO_MEMORY;
}