This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Don’t leak when pushing on to read-only array
authorFather Chrysostomos <sprout@cpan.org>
Fri, 2 Nov 2012 04:48:22 +0000 (21:48 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 2 Nov 2012 12:28:20 +0000 (05:28 -0700)
commit644ac3a877e810ca7c69833b568049c1c2665ce9
tree7244a10732ad48db5bdf9d87566b9996f4b61363
parent1870a3e0c320485d79704f9c2363ebe63d5e83ff
Don’t leak when pushing on to read-only array

$ ./miniperl -Ilib -w -e 'warn $$; while(1){eval {push @-, ""}}'

Croak first instead of creating a new element to store in the
array first and letting av_store croak.
pp.c
t/op/svleak.t