Fixed bug in DRD's realloc() wrapper.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10282 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/drd/drd_malloc_wrappers.c b/drd/drd_malloc_wrappers.c
index 457ca82..d0109f1 100644
--- a/drd/drd_malloc_wrappers.c
+++ b/drd/drd_malloc_wrappers.c
@@ -198,7 +198,7 @@
else if (old_size > new_size)
{
/* new size is smaller */
- s_stop_using_mem_callback(mc->data + new_size, old_size);
+ s_stop_using_mem_callback(mc->data + new_size, old_size - new_size);
mc->size = new_size;
mc->where = VG_(record_ExeContext)(tid, 0);
p_new = p_old;