This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix memory leak in qr// operator. This was most probably
authorMarcus Holland-Moritz <mhx-perl@gmx.net>
Sat, 18 Oct 2008 18:04:40 +0000 (18:04 +0000)
committerMarcus Holland-Moritz <mhx-perl@gmx.net>
Sat, 18 Oct 2008 18:04:40 +0000 (18:04 +0000)
introduced with #30849.

p4raw-id: //depot/perl@34506

pp_hot.c

index c3d1565..fa6ab0c 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1212,6 +1212,7 @@ PP(pp_qr)
 
     if (pkg) {
        HV* const stash = gv_stashpv(SvPV_nolen(pkg), GV_ADD);
+       SvREFCNT_dec(pkg);
        (void)sv_bless(rv, stash);
     }