On Thu, 24 Feb 2005, Dag-Erling Smørgrav wrote:
Seán C. Farley <[EMAIL PROTECTED]> writes:How does this version look?
Needlessly complicated. I'd just copy the entire environment into malloc()ed space the first time setenv() or putenv() is called.
I like complicated. :) I have written a new version that makes copies of all variables within the environment upon the first run of setenv().
Here are the two versions I have written to stop the memory leak. Old (complex): http://www.farley.org/freebsd/tmp/setenv-1.tar.bz2 New (simple): http://www.farley.org/freebsd/tmp/setenv-2.tar.bz2
Seán -- [EMAIL PROTECTED]
_______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"