summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-02-22 23:25:45 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-02-22 23:25:45 +0000
commit4b420006ebbdb2e59fddaa31a85c23d08eb999d4 (patch)
treebbe8f6546caaa154ee0d25e3aeca40876b296bd9 /perl.c
parent551a8b838dd0aec11f1a7553b070651ef7bd1a24 (diff)
downloadperl-4b420006ebbdb2e59fddaa31a85c23d08eb999d4.tar.gz
With environ one must use safesysmalloc()/safesysfree().
p4raw-id: //depot/perl@8897
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index f199e4656f..83c1157f67 100644
--- a/perl.c
+++ b/perl.c
@@ -445,8 +445,9 @@ perl_destruct(pTHXx)
I32 i;
for (i = 0; environ[i]; i++)
- Safefree(environ[i]);
- Safefree(environ);
+ safesysfree(environ[i]);
+ /* Must use safesysfree() when working with environ. */
+ safesysfree(environ);
environ = PL_origenviron;
}