diff options
Diffstat (limited to 'libcli/security')
-rw-r--r-- | libcli/security/dom_sid.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libcli/security/dom_sid.c b/libcli/security/dom_sid.c index f044733316..373f4ae175 100644 --- a/libcli/security/dom_sid.c +++ b/libcli/security/dom_sid.c @@ -272,13 +272,13 @@ struct dom_sid *dom_sid_add_rid(TALLOC_CTX *mem_ctx, { struct dom_sid *sid; - sid = talloc(mem_ctx, struct dom_sid); + sid = dom_sid_dup(mem_ctx, domain_sid); if (!sid) return NULL; - *sid = *domain_sid; - - sid->sub_auths[sid->num_auths] = rid; - sid->num_auths++; + if (!sid_append_rid(sid, rid)) { + talloc_free(sid); + return NULL; + } return sid; } |