Never call putenv() with data on the stack.
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 3 May 2015 18:06:12 +0000 (20:06 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 3 May 2015 18:10:26 +0000 (20:10 +0200)
Even though we are using putenv() here to remove items from the
environment, there is no guarantee that putenv() doesn't add the
argument to the environment anyway. In that case, we have to make sure
that it doesn't go away. We also don't want a memory leak, so keep a
list of things we unputenv()ed around, so we can reuse things.

Thanks to Poul-Henning Kamp for pointing out this problem.


No differences found