Hi,
I am porting a library to RTEMS that is calling clearenv().
I am willing to implement one for newlib. Is this a
method OK for newlib to have?
I was looking at the current environ code to gauge the
difficulty and noticed that unsetenv() does not free
any memory. Since putenv calls strdup(), I wonder
if this is right.
grep free libc/stdlib/*env*
libc/stdlib/putenv_r.c: (void) _free_r (reent_ptr, p);
libc/stdlib/putenv_r.c: (void) _free_r (reent_ptr, p);
Those are error paths. Is this a leak?
--joel