summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChip Salzenberg <chip@atlantic.net>1997-04-15 00:00:00 +1200
committerChip Salzenberg <chip@atlantic.net>1997-04-15 00:00:00 +1200
commite5ebf47976a508c997e1de5749c051409e17ebc2 (patch)
tree500c9a54ace44b478f0483a26fe804c7da33bcd1
parent9010f3dde9d2f67a11bc3a0f3506440c77114d6b (diff)
downloadperl-e5ebf47976a508c997e1de5749c051409e17ebc2.tar.gz
Fix for environment leak
(this is the same change as commit 114695e977a20e0c66aa94b08414017d929a3f66, but as applied)
-rw-r--r--util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/util.c b/util.c
index 6e5ef47289..cdb64ad3eb 100644
--- a/util.c
+++ b/util.c
@@ -1350,6 +1350,7 @@ char *nam, *val;
environ = tmpenv; /* tell exec where it is now */
}
if (!val) {
+ Safefree(environ[i]);
while (environ[i]) {
environ[i] = environ[i+1];
i++;