From a9fdfb3371bb12d47514439cf5be9ecfcf8cffb0 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Wed, 14 Aug 2013 23:28:45 +0000 Subject: [PATCH] [NTVDM] Fix bug in DosTerminateProcess. svn path=/branches/ntvdm/; revision=59740 --- subsystems/ntvdm/dos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsystems/ntvdm/dos.c b/subsystems/ntvdm/dos.c index 30ecf8c1290..18509d67b89 100644 --- a/subsystems/ntvdm/dos.c +++ b/subsystems/ntvdm/dos.c @@ -1201,7 +1201,7 @@ VOID DosTerminateProcess(WORD Psp, BYTE ReturnCode) if (CurrentMcb->BlockType != 'M' && CurrentMcb->BlockType !='Z') break; /* If this block was allocated by the process, free it */ - if (CurrentMcb->OwnerPsp == Psp) DosFreeMemory(McbSegment); + if (CurrentMcb->OwnerPsp == Psp) DosFreeMemory(McbSegment + 1); /* If this was the last block, quit */ if (CurrentMcb->BlockType == 'Z') break;