[PATCH] test-skeleton.c (xrealloc): Support realloc-as-free

Mike Frysinger vapier@gentoo.org
Thu Jun 23 12:45:00 GMT 2016


On 23 Jun 2016 14:23, Florian Weimer wrote:
> If the requested size is zero, realloc returns NULL, but the
> deallocation is still successful.

not exactly.  realloc(NULL, 0) will return a valid pointer (much
like malloc(NULL) will).  code relies on this to generate cookies.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160623/4cf14a60/attachment.sig>


More information about the Libc-alpha mailing list