Commit 6138ba08 authored by Jukka Heinonen's avatar Jukka Heinonen Committed by Alexandre Julliard

When freeing XMS memory block, return an error if block has not been

previously allocated.
parent 30678c33
......@@ -84,7 +84,11 @@ void WINAPI XMS_Handler( CONTEXT86 *context )
break;
case 0x0a: /* Free Extended Memory Block */
TRACE("free extended memory block %04x\n",DX_reg(context));
GlobalFree16(DX_reg(context));
if(!DX_reg(context) || GlobalFree16(DX_reg(context))) {
AX_reg(context) = 0; /* failure */
BL_reg(context) = 0xa2; /* invalid handle */
} else
AX_reg(context) = 1; /* success */
break;
case 0x0b: /* Move Extended Memory Block */
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment