Date: Sun, 14 May 1995 15:25:12 +1000 From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@FreeBSD.org, henrich@crh.cl.msu.edu Subject: Re: login.c environ=envinit ? Message-ID: <199505140525.PAA15514@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>Im looking at login.c ~line 400 where we reset the user environment if the p >flag is passed, and we do this but just re-assigning the environment global. >Shouldnt we free the environment memory before doing that? Only if the environment memory was malloced. But there is no way for login to know. Only setenv() knows. Perhaps unsetenv((char *)0) should be a standard way of unsetting everything. unsetenv() currently doesn't even know if setenv() called malloc and doesn't free anything. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505140525.PAA15514>