Module: wine Branch: master Commit: a0b8f178df8ed704fc732f5aef3b2e1f623512fc URL: http://source.winehq.org/git/wine.git/?a=commit;h=a0b8f178df8ed704fc732f5aef...
Author: Thomas Faller tfaller1@gmx.de Date: Wed Dec 16 22:00:58 2015 +0100
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
---
dlls/ntdll/heap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index a908f19..f928ebf 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -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 }