NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/43899: setenv(3)/unsetenv(3) memory leak



The following reply was made to PR lib/43899; it has been noted by GNATS.

From: itohy%NetBSD.org@localhost (ITOH Yasufumi)
To: gnats-bugs%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: lib/43899: setenv(3)/unsetenv(3) memory leak
Date: Sat, 25 Sep 2010 17:16:33 +0900

 In article <20100923131001.5C93F63B995%www.NetBSD.org@localhost>
 njoly%pasteur.fr@localhost writes:
 
 > >Description:
 > I just noticed that unsetenv(3) does not seems to reclaim memory that was
 > allocated by setenv(3) for a single variable.
 
 setenv(3) leaks memory by its nature.  It's a spec.
 
 The problem is that our implementation of putenv(3) leaks memory.
 The standard says we can use putenv(3) without memory leaks.
 http://www.opengroup.org/onlinepubs/9699919799/functions/putenv.html
 
 Thanks,
 -- 
 ITOH Yasufumi
 


Home | Main Index | Thread Index | Old Index