Don't crash when DosFreeMemory is called with BlockData == 0.


svn path=/trunk/; revision=67475
This commit is contained in:
Aleksandar Andrejevic 2015-04-29 00:47:06 +00:00
parent 38af0226a1
commit 86c7c4fb83

View file

@ -319,6 +319,7 @@ BOOLEAN DosFreeMemory(WORD BlockData)
PDOS_MCB Mcb = SEGMENT_TO_MCB(BlockData - 1);
DPRINT("DosFreeMemory: BlockData 0x%04X\n", BlockData);
if (BlockData == 0) return FALSE;
/* Make sure the MCB is valid */
if (Mcb->BlockType != 'M' && Mcb->BlockType != 'Z')