summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2010-07-02 19:04:35 -0500
committerCraig A. Berry <craigberry@mac.com>2010-07-02 19:07:16 -0500
commit9e2bec029fb0c747ff8d682f110159537237714b (patch)
tree28eee703823d2faf800e64bea720b835bf1d7f53 /vms
parent8bae1a1ef1c5f80478c931b196ed236a1a222e3e (diff)
downloadperl-9e2bec029fb0c747ff8d682f110159537237714b.tar.gz
Plug more memory leaks in vms.c.
In Perl_rename() we were allocating the same thing twice. In vms_fid_to_name() (used by realpath() and realname()), we had another flagrant omission of freeing local storage.
Diffstat (limited to 'vms')
-rw-r--r--vms/vms.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/vms/vms.c b/vms/vms.c
index e98c01575c..db686d2009 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -5341,10 +5341,6 @@ Stat_t dst_st;
}
/* The source must be a file specification */
- vms_dir_file = PerlMem_malloc(VMS_MAXRSS);
- if (vms_dir_file == NULL)
- _ckvmssts_noperl(SS$_INSFMEM);
-
ret_str = do_fileify_dirspec(vms_dst, vms_dir_file, 0, NULL);
if (ret_str == NULL) {
PerlMem_free(vms_dst);
@@ -14232,9 +14228,10 @@ struct statbuf_t {
if (mode) {
*mode = statbuf.old_st_mode;
}
- return 0;
}
}
+ PerlMem_free(temp_fspec);
+ PerlMem_free(fileified);
return sts;
}