On Thu, Apr 22, 2010 at 7:30 PM, Wes Garland <[email protected]> wrote: > Leaking is nasty, but I have to agree with Ed here. > > The problem with Graham's "proper" solution is that it is quite legitimate > for a pure-C caller -- e.g. a DSO with no knowledge of APR whatsoever -- to > pull an environment variable with getenv and expect to be able to hold on to > that pointer for the lifetime of the program.
Outside of the issue at hand, It's not safe to hold that getenv() pointer too long, as any other call to getenv() may change what it points at. -- Eric Covener [email protected]
