This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PL_my_cxt_list leaks
authorJirka Hruška <jirka@fud.cz>
Wed, 1 Sep 2010 10:18:43 +0000 (11:18 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 1 Sep 2010 11:24:44 +0000 (12:24 +0100)
[perl #77352]

PL_my_cxt_list was never freed

perl.c

diff --git a/perl.c b/perl.c
index 57be5d2..7e135ca 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -1071,6 +1071,10 @@ perl_destruct(pTHXx)
                             (long)cxstack_ix + 1);
     }
 
+    /* the entries in this list are allocated via SV PVX's, so get freed
+     * in sv_clean_all */
+    Safefree(PL_my_cxt_list);
+
     /* Now absolutely destruct everything, somehow or other, loops or no. */
 
     /* the 2 is for PL_fdpid and PL_strtab */