[Wine-patches] [eterhack] [1/2] ntoskrnl.exe: Do not deallocate irp->AssociatedIrp.SystemBuffer when METHOD_BUFFERED is not used.
Alexander Morozov
=?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Вт Мар 3 18:49:37 MSK 2009
----------- следующая часть -----------
From 38dfbe8327df0aadc50816e4cf3b64873d3a2fbb Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Tue, 3 Mar 2009 13:40:41 +0300
Subject: [PATCH 1/2] ntoskrnl.exe: Do not deallocate irp->AssociatedIrp.SystemBuffer when METHOD_BUFFERED is not used.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index d5fb35a..345be4c 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1663,13 +1663,15 @@ void CDECL wine_complete_request( IRP *irp, UCHAR priority_boost )
list_remove( &instance->entry );
HeapFree( GetProcessHeap(), 0, instance );
- if (buf)
+ if (mdl)
+ {
+ ExFreePool( mdl );
+ }
+ else if (buf)
{
memcpy( irp->UserBuffer, buf, irp->IoStatus.Information );
ExFreePool( buf );
}
- if (mdl)
- ExFreePool( mdl );
IoFreeIrp( irp );
break;
}
--
1.6.1.3.GIT
Подробная информация о списке рассылки Wine-patches