Commit 7223f11d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

ntoskrnl.exe: Don't keep reference to driver created file objects on client side.

Server keeps instead. Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent bd94c43f
......@@ -551,7 +551,6 @@ static void *create_file_object( HANDLE handle )
/* transfer result of IRP back to wineserver */
static NTSTATUS WINAPI dispatch_irp_completion( DEVICE_OBJECT *device, IRP *irp, void *context )
{
FILE_OBJECT *file = irp->Tail.Overlay.OriginalFileObject;
HANDLE irp_handle = context;
void *out_buff = irp->UserBuffer;
......@@ -571,12 +570,6 @@ static NTSTATUS WINAPI dispatch_irp_completion( DEVICE_OBJECT *device, IRP *irp,
}
SERVER_END_REQ;
if (irp->Flags & IRP_CLOSE_OPERATION)
{
ObDereferenceObject( file );
irp->Tail.Overlay.OriginalFileObject = NULL;
}
if (irp->UserBuffer != irp->AssociatedIrp.SystemBuffer)
{
HeapFree( GetProcessHeap(), 0, irp->UserBuffer );
......@@ -618,7 +611,6 @@ static NTSTATUS dispatch_create( const irp_params_t *params, void *in_buff, ULON
if (!(irp = IoAllocateIrp( device->StackSize, FALSE ))) return STATUS_NO_MEMORY;
ObReferenceObject( file );
irpsp = IoGetNextIrpStackLocation( irp );
irpsp->MajorFunction = IRP_MJ_CREATE;
irpsp->FileObject = file;
......
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