Loading...
--- Libc/Libc-997.90.3/stdlib/FreeBSD/reallocf.c
+++ Libc/Libc-320/stdlib/FreeBSD/reallocf.c
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: src/lib/libc/stdlib/reallocf.c,v 1.4 2002/03/22 21:53:10 obrien Exp $");
#include <stdlib.h>
@@ -35,14 +35,7 @@
void *nptr;
nptr = realloc(ptr, size);
-
- /*
- * When the System V compatibility option (malloc "V" flag) is
- * in effect, realloc(ptr, 0) frees the memory and returns NULL.
- * So, to avoid double free, call free() only when size != 0.
- * realloc(ptr, 0) can't fail when ptr != NULL.
- */
- if (!nptr && ptr && size != 0)
+ if (!nptr && ptr)
free(ptr);
return (nptr);
}