Alexandre Julliard : krnl386.exe: Don' t try to free again an already freed global block.
Alexandre Julliard
julliard at winehq.org
Wed Mar 3 11:15:45 CST 2010
Module: wine
Branch: master
Commit: f8a89aa0833e213eeb5cf91f16628ee5480fd263
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f8a89aa0833e213eeb5cf91f16628ee5480fd263
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Mar 3 11:52:59 2010 +0100
krnl386.exe: Don't try to free again an already freed global block.
---
dlls/krnl386.exe16/global.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/krnl386.exe16/global.c b/dlls/krnl386.exe16/global.c
index db07477..ba4d7df 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;
More information about the wine-cvs
mailing list