fix memory leak in putenv()

this leak was caused by PL_use_safe_putenv = 1 [#49872]
v0.10