diff options
author | Volker Lendecke <vl@samba.org> | 2014-05-26 20:57:31 +0000 |
---|---|---|
committer | David Disseldorp <ddiss@samba.org> | 2014-05-27 17:32:12 +0200 |
commit | af83a158878b92c933d06c19d5672592f542097b (patch) | |
tree | 427fb92ead4a614831f4d3c474f77970181221be /libcli/security | |
parent | 80ef004721e6d88bc87e4d1a1e100cb87e81cc93 (diff) | |
download | samba-af83a158878b92c933d06c19d5672592f542097b.tar.gz samba-af83a158878b92c933d06c19d5672592f542097b.tar.xz samba-af83a158878b92c933d06c19d5672592f542097b.zip |
libcli: Avoid a talloc/free
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
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 95a09b3378..6812d42ba0 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; } |