Commit 2a7a1bbe authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

server: Handle duplicate handles when inheriting them for the new process.

parent b4ca2d00
...@@ -363,8 +363,9 @@ static void inherit_handle( struct process *parent, const obj_handle_t handle, s ...@@ -363,8 +363,9 @@ static void inherit_handle( struct process *parent, const obj_handle_t handle, s
src = get_handle( parent, handle ); src = get_handle( parent, handle );
if (!src || !(src->access & RESERVED_INHERIT)) return; if (!src || !(src->access & RESERVED_INHERIT)) return;
grab_object_for_handle( src->ptr );
index = handle_to_index( handle ); index = handle_to_index( handle );
if (dst[index].ptr) return;
grab_object_for_handle( src->ptr );
dst[index] = *src; dst[index] = *src;
table->last = max( table->last, index ); table->last = max( table->last, index );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment