server: Prevent a crash on error while creating a token.
This commit is contained in:
parent
c04e7e7878
commit
55fdda4c3e
|
@ -424,6 +424,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||||
list_init( &token->privileges );
|
list_init( &token->privileges );
|
||||||
list_init( &token->groups );
|
list_init( &token->groups );
|
||||||
token->primary = primary;
|
token->primary = primary;
|
||||||
|
token->default_dacl = NULL;
|
||||||
|
|
||||||
/* copy user */
|
/* copy user */
|
||||||
token->user = memdup( user, FIELD_OFFSET(SID, SubAuthority[user->SubAuthorityCount]) );
|
token->user = memdup( user, FIELD_OFFSET(SID, SubAuthority[user->SubAuthorityCount]) );
|
||||||
|
@ -477,8 +478,6 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
token->default_dacl = NULL;
|
|
||||||
|
|
||||||
token->source = source;
|
token->source = source;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue