This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix nasty memory leak in vms.c:Perl_flex_stat_int().
[perl5.git] / vms / vms.c
index a2552d7..e98c015 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -12911,6 +12911,8 @@ Perl_flex_stat_int(pTHX_ const char *fspec, Stat_t *statbufp, int lstat_flag)
     }
     /* If we were successful, leave errno where we found it */
     if (retval == 0) RESTORE_ERRNO;
+    PerlMem_free(temp_fspec);
+    PerlMem_free(fileified);
     return retval;
 
 }  /* end of flex_stat_int() */