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().
authorCraig A. Berry <craigberry@mac.com>
Fri, 2 Jul 2010 00:47:34 +0000 (19:47 -0500)
committerCraig A. Berry <craigberry@mac.com>
Fri, 2 Jul 2010 00:47:34 +0000 (19:47 -0500)
Thanks to Mark Berryman in

  Message-id: <52BFD39B-C4BA-4350-AA1F-C2E7F128EF21@theberrymans.com>

for the report and the fix.

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() */