krnl386.exe: Don't try to free again an already freed global block.

This commit is contained in:
Alexandre Julliard 2010-03-03 11:52:59 +01:00
parent 0270f18e11
commit f8a89aa083
1 changed files with 5 additions and 0 deletions

View File

@ -182,6 +182,11 @@ BOOL16 GLOBAL_FreeBlock( HGLOBAL16 handle )
sel = GlobalHandleToSel16( handle );
if (!VALID_HANDLE(sel)) return FALSE;
pArena = GET_ARENA_PTR(sel);
if (!pArena->size)
{
WARN( "already free %x\n", handle );
return FALSE;
}
SELECTOR_FreeBlock( sel );
memset( pArena, 0, sizeof(GLOBALARENA) );
return TRUE;