Commit a0b8f178 authored by Thomas Faller's avatar Thomas Faller Committed by Alexandre Julliard

ntdll: Fix valgrind heap realloc notifications.

Valgrind can't handle a realloc if the new size is zero. Signed-off-by: 's avatarThomas Faller <tfaller1@gmx.de> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 86df15cb
......@@ -266,7 +266,8 @@ static inline void notify_free( void const *ptr )
static inline void notify_realloc( void const *ptr, SIZE_T size_old, SIZE_T size_new )
{
#ifdef VALGRIND_RESIZEINPLACE_BLOCK
VALGRIND_RESIZEINPLACE_BLOCK( ptr, size_old, size_new, 0 );
/* zero is not a valid size */
VALGRIND_RESIZEINPLACE_BLOCK( ptr, size_old ? size_old : 1, size_new ? size_new : 1, 0 );
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment