Subject: Re: try again: unsetenv memory leak fix
To: None <tech-userlevel@netbsd.org>
From: Masaru OKI <oki@netbsd.org>
List: tech-userlevel
Date: 06/30/2003 04:39:01
On Mon, 30 Jun 2003 04:29:27 +0900
Masaru OKI <oki@netbsd.org> wrote:
> + if (__alloced_env != 0 && __alloced_env[offset] != 0) {
> + free(__alloced_env[offset]);
> + mp = &__alloced_env[offset];
> + }
oops, I found my err, again :-(
first condition is incorrect.
correct it:
if (__alloced_env) {
mp = ...;
if (__alloced_env[offset])
free(...);
}
I'll go to the bed...
--
Masaru OKI <oki@netbsd.org>