Date: Mon, 14 Sep 1998 13:34:35 -0700 (PDT) From: Warner Losh <imp@FreeBSD.ORG> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: cvs commit: src/include stdlib.h src/lib/libc/stdlib reallocf.c Makefile.inc malloc.3 Message-ID: <199809142034.NAA07648@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
imp 1998/09/14 13:34:34 PDT Modified files: include stdlib.h lib/libc/stdlib Makefile.inc malloc.3 Added files: lib/libc/stdlib reallocf.c Log: Add reallocf to the library. This function is simliar to realloc, but when it returns NULL to indicate failure, it will also free the memory that was passed to it, if that was non-null. This does not change the semantics of realloc. A second commit will be done to commit the conversion of those places in the code that can safely use this to avoid memory leaks when confronted with low memory situations. Beaten-to-death-but-finally-approved-in: -current Revision Changes Path 1.14 +1 -0 src/include/stdlib.h 1.16 +3 -3 src/lib/libc/stdlib/Makefile.inc 1.16 +27 -10 src/lib/libc/stdlib/malloc.3
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809142034.NAA07648>