Skip to content

Commit c7d5298

Browse files
ronawhojasone
authored andcommitted
Fix a Valgrind regression in chunk_alloc_wrapper().
This regression was caused by d412624 (Move retaining out of default chunk hooks).
1 parent 9de0094 commit c7d5298

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/chunk.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,12 @@ chunk_alloc_wrapper(tsdn_t *tsdn, arena_t *arena, chunk_hooks_t *chunk_hooks,
493493

494494
if (ret == NULL)
495495
return (NULL);
496+
497+
if (config_valgrind && chunk_hooks->alloc !=
498+
chunk_alloc_default)
499+
JEMALLOC_VALGRIND_MAKE_MEM_UNDEFINED(ret, chunksize);
496500
}
497501

498-
if (config_valgrind && chunk_hooks->alloc != chunk_alloc_default)
499-
JEMALLOC_VALGRIND_MAKE_MEM_UNDEFINED(ret, chunksize);
500502
return (ret);
501503
}
502504

0 commit comments

Comments
 (0)