diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 13cc57916..e7c01246c 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.68 - ================================== + Fix valgrind error reports in free of pool chunks with DEBUG_MEM. Aling size of structure chunk for fast pool allocator to 8 bytes. Simplify some pointer operations in dm_free_aux() debug code. Remove unused dbg_malloc.h file from source tree. diff --git a/libdm/mm/pool-fast.c b/libdm/mm/pool-fast.c index 386776196..e14d073ca 100644 --- a/libdm/mm/pool-fast.c +++ b/libdm/mm/pool-fast.c @@ -300,6 +300,12 @@ static struct chunk *_new_chunk(struct dm_pool *p, size_t s) static void _free_chunk(struct chunk *c) { +#ifdef VALGRIND_POOL +# ifdef DEBUG_MEM + if (c) + VALGRIND_MAKE_MEM_UNDEFINED(c + 1, c->end - (char *) (c + 1)); +# endif +#endif dm_free(c); }