diff options
Diffstat (limited to 'libcli/security')
-rw-r--r-- | libcli/security/security_token.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libcli/security/security_token.c b/libcli/security/security_token.c index 95a09b33783..6812d42ba01 100644 --- a/libcli/security/security_token.c +++ b/libcli/security/security_token.c @@ -119,12 +119,14 @@ bool security_token_has_sid(const struct security_token *token, const struct dom bool security_token_has_sid_string(const struct security_token *token, const char *sid_string) { bool ret; - struct dom_sid *sid = dom_sid_parse_talloc(NULL, sid_string); - if (!sid) return false; + struct dom_sid sid; - ret = security_token_has_sid(token, sid); + ret = dom_sid_parse(sid_string, &sid); + if (!ret) { + return false; + } - talloc_free(sid); + ret = security_token_has_sid(token, &sid); return ret; } |