server: Fixed refcounting in get_fd requests for named pipe and mailslot devices.
This commit is contained in:
parent
435e36e366
commit
5bcd0888ef
|
@ -279,7 +279,7 @@ static void mailslot_device_dump( struct object *obj, int verbose )
|
|||
static struct fd *mailslot_device_get_fd( struct object *obj )
|
||||
{
|
||||
struct mailslot_device *device = (struct mailslot_device *)obj;
|
||||
return device->fd;
|
||||
return (struct fd *)grab_object( device->fd );
|
||||
}
|
||||
|
||||
static struct object *mailslot_device_lookup_name( struct object *obj, struct unicode_str *name,
|
||||
|
|
|
@ -411,7 +411,7 @@ static void named_pipe_device_dump( struct object *obj, int verbose )
|
|||
static struct fd *named_pipe_device_get_fd( struct object *obj )
|
||||
{
|
||||
struct named_pipe_device *device = (struct named_pipe_device *)obj;
|
||||
return device->fd;
|
||||
return (struct fd *)grab_object( device->fd );
|
||||
}
|
||||
|
||||
static struct object *named_pipe_device_lookup_name( struct object *obj, struct unicode_str *name,
|
||||
|
|
Loading…
Reference in New Issue