From 3e9e0d0737452c1080522ca1cae8864f99e5b9b5 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Sat, 9 Nov 2002 20:27:03 +0000 Subject: [PATCH] * Unlock the address space if MmOpenMemoryAreaByAddress fails (MmWritePhysicalAddress). svn path=/trunk/; revision=3718 --- reactos/ntoskrnl/mm/rmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/mm/rmap.c b/reactos/ntoskrnl/mm/rmap.c index 8537b9809a7..d1273f474b8 100644 --- a/reactos/ntoskrnl/mm/rmap.c +++ b/reactos/ntoskrnl/mm/rmap.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: rmap.c,v 1.13 2002/11/05 20:48:08 hbirr Exp $ +/* $Id: rmap.c,v 1.14 2002/11/09 20:27:03 hbirr Exp $ * * COPYRIGHT: See COPYING in the top directory * PROJECT: ReactOS kernel @@ -104,6 +104,7 @@ MmWritePagePhysicalAddress(PHYSICAL_ADDRESS PhysicalAddress) MemoryArea = MmOpenMemoryAreaByAddress(&Process->AddressSpace, Address); if (MemoryArea == NULL) { + MmUnlockAddressSpace(&Process->AddressSpace); ObDereferenceObject(Process); return(STATUS_UNSUCCESSFUL); }