From f8a89aa0833e213eeb5cf91f16628ee5480fd263 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 3 Mar 2010 11:52:59 +0100 Subject: [PATCH] krnl386.exe: Don't try to free again an already freed global block. --- dlls/krnl386.exe16/global.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/krnl386.exe16/global.c b/dlls/krnl386.exe16/global.c index db07477b5e..ba4d7df645 100644 --- a/dlls/krnl386.exe16/global.c +++ b/dlls/krnl386.exe16/global.c @@ -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; -- 2.33.8