FreeBSD/sys/kern/kern_malloc.c
/*
 *	reallocf: same as realloc() but free memory on failure.
 */
same as realloc() but free memory on failure.
same as realloc () but free memory on failure .
void *
reallocf(void *addr, unsigned long size, struct malloc_type *mtp, int flags)
{
	void *mem;
	if ((mem = realloc(addr, size, mtp, flags)) == NULL)
		free(addr, mtp);
	return (mem);
}
void * reallocf ( void * addr , unsigned long size , struct malloc_type * mtp , int flags ) { void * mem ; if ( ( mem = realloc ( addr , size , mtp , flags ) ) == NULL ) free ( addr , mtp ) ; return ( mem ) ; }
reallocf: same as realloc() but free memory on failure.
reallocf : same as realloc () but free memory on failure .