mirror of
https://github.com/reactos/wine.git
synced 2025-02-09 05:36:56 +00:00
kernel: Fix clearing of memory in LocalReAlloc16(..., LMEM_ZEROMEMORY).
This commit is contained in:
parent
cfbd3384e2
commit
2e5a48be43
@ -1331,7 +1331,12 @@ HLOCAL16 WINAPI LocalReAlloc16( HLOCAL16 handle, WORD size, UINT16 flags )
|
||||
TRACE("size increase, making new free block\n");
|
||||
LOCAL_GrowArenaUpward(ds, arena, nextarena - arena);
|
||||
if (flags & LMEM_ZEROINIT)
|
||||
memset((char *)pArena + oldsize, 0, size - oldsize);
|
||||
{
|
||||
char *oldend = (char *)pArena + ARENA_HEADER_SIZE + oldsize;
|
||||
char *newend = ptr + pArena->next;
|
||||
TRACE("Clearing memory from %p to %p (DS -> %p)\n", oldend, newend, ptr);
|
||||
memset(oldend, 0, newend - oldend);
|
||||
}
|
||||
|
||||
TRACE("returning %04x\n", handle );
|
||||
return handle;
|
||||
|
Loading…
x
Reference in New Issue
Block a user