Commit 3f7c3ff7 authored by Bill Medland's avatar Bill Medland Committed by Alexandre Julliard

Fix for client accessing a named pipe after the server closes it.

parent ac1d1056
......@@ -987,7 +987,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
if ((obj = get_handle_obj( process, handle, access, NULL )))
{
if (!(fd = get_obj_fd( obj ))) set_error( STATUS_OBJECT_TYPE_MISMATCH );
fd = get_obj_fd( obj );
release_object( obj );
}
return fd;
......
......@@ -163,7 +163,9 @@ static void notify_waiter( struct pipe_user *user, unsigned int status)
static struct fd *pipe_user_get_fd( struct object *obj )
{
struct pipe_user *user = (struct pipe_user *)obj;
return (struct fd *)grab_object( user->fd );
if (user->fd) return (struct fd *)grab_object( user->fd );
set_error( STATUS_PIPE_DISCONNECTED );
return NULL;
}
static void pipe_user_destroy( struct object *obj)
......
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