summaryrefslogtreecommitdiff
path: root/source4/libcli/security/security_descriptor.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/security/security_descriptor.c')
-rw-r--r--source4/libcli/security/security_descriptor.c5
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);