ntoskrnl.exe: Don't keep reference to driver created file objects on client side.
Server keeps instead. Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bd94c43fcf
commit
7223f11d4a
|
@ -551,7 +551,6 @@ static void *create_file_object( HANDLE handle )
|
||||||
/* transfer result of IRP back to wineserver */
|
/* transfer result of IRP back to wineserver */
|
||||||
static NTSTATUS WINAPI dispatch_irp_completion( DEVICE_OBJECT *device, IRP *irp, void *context )
|
static NTSTATUS WINAPI dispatch_irp_completion( DEVICE_OBJECT *device, IRP *irp, void *context )
|
||||||
{
|
{
|
||||||
FILE_OBJECT *file = irp->Tail.Overlay.OriginalFileObject;
|
|
||||||
HANDLE irp_handle = context;
|
HANDLE irp_handle = context;
|
||||||
void *out_buff = irp->UserBuffer;
|
void *out_buff = irp->UserBuffer;
|
||||||
|
|
||||||
|
@ -571,12 +570,6 @@ static NTSTATUS WINAPI dispatch_irp_completion( DEVICE_OBJECT *device, IRP *irp,
|
||||||
}
|
}
|
||||||
SERVER_END_REQ;
|
SERVER_END_REQ;
|
||||||
|
|
||||||
if (irp->Flags & IRP_CLOSE_OPERATION)
|
|
||||||
{
|
|
||||||
ObDereferenceObject( file );
|
|
||||||
irp->Tail.Overlay.OriginalFileObject = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (irp->UserBuffer != irp->AssociatedIrp.SystemBuffer)
|
if (irp->UserBuffer != irp->AssociatedIrp.SystemBuffer)
|
||||||
{
|
{
|
||||||
HeapFree( GetProcessHeap(), 0, irp->UserBuffer );
|
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;
|
if (!(irp = IoAllocateIrp( device->StackSize, FALSE ))) return STATUS_NO_MEMORY;
|
||||||
|
|
||||||
ObReferenceObject( file );
|
|
||||||
irpsp = IoGetNextIrpStackLocation( irp );
|
irpsp = IoGetNextIrpStackLocation( irp );
|
||||||
irpsp->MajorFunction = IRP_MJ_CREATE;
|
irpsp->MajorFunction = IRP_MJ_CREATE;
|
||||||
irpsp->FileObject = file;
|
irpsp->FileObject = file;
|
||||||
|
|
Loading…
Reference in New Issue