diff --git a/source3/passdb/pdb_samba_dsdb.c b/source3/passdb/pdb_samba_dsdb.c index f405c51aaeb..0a84f9af4b4 100644 --- a/source3/passdb/pdb_samba_dsdb.c +++ b/source3/passdb/pdb_samba_dsdb.c @@ -1722,9 +1722,6 @@ static NTSTATUS pdb_samba_dsdb_enum_aliasmem(struct pdb_methods *m, status = dsdb_enum_group_mem(state->ldb, mem_ctx, dn, pmembers, &num_members); *pnum_members = num_members; - if (NT_STATUS_IS_OK(status)) { - talloc_steal(mem_ctx, pmembers); - } talloc_free(tmp_ctx); return status; } diff --git a/source4/dsdb/common/util_samr.c b/source4/dsdb/common/util_samr.c index bb906fa0488..f022cfe296e 100644 --- a/source4/dsdb/common/util_samr.c +++ b/source4/dsdb/common/util_samr.c @@ -481,7 +481,7 @@ NTSTATUS dsdb_enum_group_mem(struct ldb_context *ldb, ++j; } - *members_out = talloc_steal(mem_ctx, members); + *members_out = members; *pnum_members = j; talloc_free(tmp_ctx); return NT_STATUS_OK;