server: Handle duplicate handles when inheriting them for the new process.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50004 Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b4ca2d001c
commit
2a7a1bbee2
|
@ -363,8 +363,9 @@ static void inherit_handle( struct process *parent, const obj_handle_t handle, s
|
|||
|
||||
src = get_handle( parent, handle );
|
||||
if (!src || !(src->access & RESERVED_INHERIT)) return;
|
||||
grab_object_for_handle( src->ptr );
|
||||
index = handle_to_index( handle );
|
||||
if (dst[index].ptr) return;
|
||||
grab_object_for_handle( src->ptr );
|
||||
dst[index] = *src;
|
||||
table->last = max( table->last, index );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue