Ignore MALLOCLIKE_BLOCK/FREELIKE_BLOCK if addr==0.  Fixes bug 137073.  DRD
now has its own copy of custom_alloc.c which is a little different to
Memcheck's;  making them both work with the same version was too difficult.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10455 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/include/valgrind.h b/include/valgrind.h
index 44c9739..bdb037c 100644
--- a/include/valgrind.h
+++ b/include/valgrind.h
@@ -3886,6 +3886,8 @@
    superblocks, rather than mmap() or brk(), this will not work properly --
    you'll likely get assertion failures during leak detection.  This is
    because Valgrind doesn't like seeing overlapping heap blocks.  Sorry.
+
+   Ignored if addr == 0.
 */
 #define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed)    \
    {unsigned int _qzz_res;                                        \
@@ -3894,7 +3896,9 @@
                                addr, sizeB, rzB, is_zeroed, 0);   \
    }
 
-/* See the comment for VALGRIND_MALLOCLIKE_BLOCK for details. */
+/* See the comment for VALGRIND_MALLOCLIKE_BLOCK for details.
+   Ignored if addr == 0.
+*/
 #define VALGRIND_FREELIKE_BLOCK(addr, rzB)                        \
    {unsigned int _qzz_res;                                        \
     VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0,                       \