In the man page for realloc(3p)[1] does correctly mention the differences in the different C standards of the realloc(<somePointer>,0) behaviour. The malloc(3)[2] manpage, which also describes the realloc() function, does not mention it and says memory is freed with realloc(<somePointer>,0). This is the case in glibc but never C standards, C99 or newer, do not specify that memory is freed when size is 0 and there are systems which do not free memory with realloc(<somePointer>,0). I argue both manpages should mention the different standards and that realloc(<somePointer>,0) is non-portable. [1] https://man7.org/linux/man-pages/man3/realloc.3p.html [2] https://man7.org/linux/man-pages/man3/malloc.3.html
Created attachment 294513 [details] Specify the non-portability of realloc() with size 0
Fixed in commit da116d481b79892026029b442fb381713a09f123