env: avoid leaving dangling pointers in __env_map
authorAlexander Monakov <amonakov@ispras.ru>
Sun, 6 Mar 2016 17:22:38 +0000 (20:22 +0300)
committerRich Felker <dalias@aerifal.cx>
Sun, 6 Mar 2016 18:33:52 +0000 (13:33 -0500)
commit9543656cc32fda48fc463f332ee20e91eed2b768
tree84f79e285a1aa86c18bcc7015f07568afb3f61c2
parent589aefa5b061647e8b9ad9bca3aaa8dc6222460a
env: avoid leaving dangling pointers in __env_map

This is the minimal fix for __putenv leaving a pointer to freed heap
storage in __env_map array, which could later on lead to errors such
as double-free.
src/env/putenv.c