diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-08-23 09:45:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:34:24 -0500 |
commit | 7b211a11c34d15aa51d40bab34080e31e48140d9 (patch) | |
tree | 2851fb4686ed1894da62362499edeaab2607bf5e /source4/libcli/security/security_descriptor.c | |
parent | aaa0aff2d6cea65b07320790c16fff127c12a65b (diff) | |
download | samba-7b211a11c34d15aa51d40bab34080e31e48140d9.tar.gz samba-7b211a11c34d15aa51d40bab34080e31e48140d9.tar.bz2 samba-7b211a11c34d15aa51d40bab34080e31e48140d9.zip |
r9511: - fix the memory trees
- add a note about a possible talloc_free()
metze
(This used to be commit 550e3030f0e02720b527f3b4923457f05f484e6e)
Diffstat (limited to 'source4/libcli/security/security_descriptor.c')
-rw-r--r-- | source4/libcli/security/security_descriptor.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/libcli/security/security_descriptor.c b/source4/libcli/security/security_descriptor.c index 703abf7970..c28960be80 100644 --- a/source4/libcli/security/security_descriptor.c +++ b/source4/libcli/security/security_descriptor.c @@ -317,14 +317,14 @@ struct security_descriptor *security_descriptor_create(TALLOC_CTX *mem_ctx, if (sd == NULL) return NULL; if (owner_sid) { - sd->owner_sid = dom_sid_parse_talloc(mem_ctx, owner_sid); + sd->owner_sid = dom_sid_parse_talloc(sd, owner_sid); if (sd->owner_sid == NULL) { talloc_free(sd); return NULL; } } if (group_sid) { - sd->group_sid = dom_sid_parse_talloc(mem_ctx, group_sid); + sd->group_sid = dom_sid_parse_talloc(sd, group_sid); if (sd->group_sid == NULL) { talloc_free(sd); return NULL; @@ -353,6 +353,7 @@ struct security_descriptor *security_descriptor_create(TALLOC_CTX *mem_ctx, } ace->trustee = *sid; status = security_descriptor_dacl_add(sd, ace); + /* TODO: check: would talloc_free(ace) here be correct? */ if (!NT_STATUS_IS_OK(status)) { va_end(ap); talloc_free(sd); |