mirror of
https://github.com/reactos/reactos
synced 2025-10-06 00:12:51 +02:00
[NTOS:MM] Fix Lazarus hang when closing running project with "X" (#8331)
CORE-20172 Make DbgkUnMapViewOfSection in function MiRosUnmapViewOfSection contingent on MapCount being 0.
This commit is contained in:
@@ -3663,6 +3663,7 @@ MiRosUnmapViewOfSection(
|
||||
PMM_IMAGE_SECTION_OBJECT ImageSectionObject;
|
||||
PMM_SECTION_SEGMENT SectionSegments;
|
||||
PMM_SECTION_SEGMENT Segment;
|
||||
ULONG MapCount;
|
||||
|
||||
Segment = MemoryArea->SectionData.Segment;
|
||||
ImageSectionObject = ImageSectionObjectFromSegment(Segment);
|
||||
@@ -3700,7 +3701,9 @@ MiRosUnmapViewOfSection(
|
||||
}
|
||||
}
|
||||
DPRINT("One mapping less for %p\n", ImageSectionObject->FileObject->SectionObjectPointer);
|
||||
InterlockedDecrement(&ImageSectionObject->MapCount);
|
||||
MapCount = InterlockedDecrement(&ImageSectionObject->MapCount);
|
||||
if (MapCount != 0)
|
||||
ImageBaseAddress = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user