code more naive and robust:
1. When setting ev_value, also always set ev_flags appropriately
2. Always check ev_value and ev_flags before calling free.
Both the value and the EV_DYNAMIC property can come directly from the
consumers of the environment functionality, so it's good to be careful.
And since this code is typically not looked at for long periods of
time, it's good to have it be a little "dumb-looking".
Trigger case for the bug:
env_setenv("foo", 0, "1", NULL, NULL);
env_setenv("foo", 0, "2", NULL, NULL);
Obtained from: Juniper Networks, Inc.
compact and much better one donated by Matt Dillon. Implement a simple
sbrk() which uses the existing setheap() api.
Remove the custom allocator from the UFS code. It wasn't working quite
right, and it shouldn't be needed with the new allocator.
Fix a serious problem with changing the value of already-existent
environment variables. Don't attempt to modify the supposedly-const
argument to putenv()
Fix an off-by-one sizing error in the zipfs code detected by the new
allocator.
Submitted by: zmalloc from Matt Dillon <dillon@backplane.com>