From 156d66ec24f93657e3001d5ba4ea2e4cf5ffd248 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 1 Feb 2010 12:35:32 +0100 Subject: [PATCH] ntdll: Avoid reporting a freed block twice to Valgrind. --- dlls/ntdll/heap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index 5e57fd0c9f..4c7318444d 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -281,9 +281,8 @@ static void subheap_notify_free_all(SUBHEAP const *subheap) else { ARENA_INUSE const *pArena = (ARENA_INUSE const *)ptr; - if (pArena->magic != ARENA_INUSE_MAGIC && pArena->magic != ARENA_PENDING_MAGIC) - ERR("bad inuse_magic @%p\n", pArena); - notify_free(pArena + 1); + if (pArena->magic == ARENA_INUSE_MAGIC) notify_free(pArena + 1); + else if (pArena->magic != ARENA_PENDING_MAGIC) ERR("bad inuse_magic @%p\n", pArena); ptr += sizeof(*pArena) + (pArena->size & ARENA_SIZE_MASK); } } -- 2.32.0.93.g670b81a890