mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
ntdll: Fix valgrind heap realloc notifications.
Valgrind can't handle a realloc if the new size is zero. Signed-off-by: Thomas Faller <tfaller1@gmx.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
86df15cbf1
commit
a0b8f178df
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue