Skip to content
Snippets Groups Projects
Commit a0b8f178 authored by Thomas Faller's avatar Thomas Faller Committed by Alexandre Julliard
Browse files

ntdll: Fix valgrind heap realloc notifications.


Valgrind can't handle a realloc if the new size is zero.

Signed-off-by: default avatarThomas Faller <tfaller1@gmx.de>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent 86df15cb
Branches
Tags
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment