struct security_ace has a struct dom_sid, not a pointer to it. So we don't have
to talloc it first and then not free it.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue May 27 12:54:55 CEST 2014 on sn-devel-104
uint8_t flags)
{
- struct dom_sid *sid;
struct security_ace *ace;
+ bool ok;
ace = talloc_zero(mem_ctx, struct security_ace);
if (ace == NULL) {
return NULL;
}
- sid = dom_sid_parse_talloc(ace, sid_str);
- if (sid == NULL) {
+ ok = dom_sid_parse(sid_str, &ace->trustee);
+ if (!ok) {
talloc_free(ace);
return NULL;
}
-
- ace->trustee = *sid;
ace->type = type;
ace->access_mask = access_mask;
ace->flags = flags;