This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #114764] Stop my vars with attrs from leaking
authorFather Chrysostomos <sprout@cpan.org>
Thu, 20 Sep 2012 04:53:51 +0000 (21:53 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 20 Sep 2012 04:53:51 +0000 (21:53 -0700)
commit9fa29fa7929b4167c5491b792c5cc7e4365a2839
treeb13890746e2e27e5a1aea88e32f9fd9dc037f499
parenta35cc1c13abf28a1d52012f7dd511e544902becf
[perl #114764] Stop my vars with attrs from leaking

S_apply_attrs was creating a SV containing a stash name, that was
later to be put in a const op, which would take care of freeing it.
But it didn’t free it for a my variable, because the branch where that
const op was created didn’t apply.  So move the creation of that SV
inside the branch that uses it, otherwise it leaks.  This leak was the
result of commit 95f0a2f1ffc6.
op.c
t/op/svleak.t