This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Don’t leak subs containing syntax errors
I fixed this for BEGIN blocks earlier, but missed the fact that
all subs are affected.
When called without an o argument (from newANONATTRSUB), newATTRSUB
is expected to return a CV with an unowned reference count of which
the caller will take ownership. We cannot have newATTRSUB returning
a freed CV, so we have it return null instead. But that means
ck_anoncode and pm_runtime have to account for that.