diff options
author | Daniel Dragan <bulk88@hotmail.com> | 2014-05-19 19:45:41 -0400 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2014-06-02 11:09:39 +1000 |
commit | 0c2c57a86cc6ec5688af5df66a8b8929f97ac491 (patch) | |
tree | 60bd3934974907324c4bd1f0192baba6aad5f4e1 /win32 | |
parent | 615a2e7f2463ed7fed1d6e1819306477ba1709d1 (diff) | |
download | perl-0c2c57a86cc6ec5688af5df66a8b8929f97ac491.tar.gz |
remove intentional leak in win32/win32.c ansify_path
The leak for was workaround for a bug (feature?) of Borland RTL where
putenv kept the passed in pointer, see commit 3e5d884e5e .
Borland was removed so this goes too. Leak found with Dr Memory.
msvcrt.dll from WinXP SP3 does not leak on a call to putenv, static linked
CRT from VC6 was confirmed to leak.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/win32/win32.c b/win32/win32.c index 5a112ef6b1..9126eec6df 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -4356,13 +4356,7 @@ ansify_path(void) * will not call mg_set() if it initializes %ENV from `environ`. */ SetEnvironmentVariableA("PATH", ansi_path+5); - /* We are intentionally leaking the ansi_path string here because - * the some runtime libraries puts it directly into the environ - * array. The Microsoft runtime library seems to make a copy, - * but will leak the copy should it be replaced again later. - * Since this code is only called once during PERL_SYS_INIT this - * shouldn't really matter. - */ + win32_free(ansi_path); } win32_free(wide_path); } |