mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
server: Handle failure of mem_alloc in duplicate_token.
This commit is contained in:
parent
9e0d0563c1
commit
0bf1c22cad
@ -1031,6 +1031,12 @@ DECL_HANDLER(duplicate_token)
|
||||
{
|
||||
size_t size = FIELD_OFFSET( struct sid_and_attributes, sid.SubAuthority[group->sid.SubAuthorityCount] );
|
||||
struct sid_and_attributes *newgroup = mem_alloc( size );
|
||||
if (!newgroup)
|
||||
{
|
||||
release_object( token );
|
||||
release_object( src_token );
|
||||
return;
|
||||
}
|
||||
memcpy( newgroup, group, size );
|
||||
list_add_tail( &token->groups, &newgroup->entry );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user