setenv memory leak fix (take 3)

Sean C. Farley sean-freebsd at
Tue May 1 02:28:51 UTC 2007

On Fri, 27 Apr 2007, Andrey Chernov wrote:

> On Thu, Apr 26, 2007 at 08:10:29PM -0500, Sean C. Farley wrote:
>>  Are there any opinions on having unsetenv() return a value to match
>>  unsetenv() in IEEE Std 1003.1?
> There is no much options because we should conform to standards and
> unsetenv() should return int therefore.

I know that unsetenv() can be changed without problems since it has no
return value at the moment.  The others are more difficult but not
impossible.  I see that a mild discussion has occurred on cvs.  :)

Here are both scenarios with my code changes:
BSD[1] (only unsetenv() is updated to return an int.  Easy to change
POSIX[2] (all *env() functions are updated to reflect POSIX)

sean-freebsd at

More information about the freebsd-current mailing list