This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix a leak with indented heredocs
authorDavid Mitchell <davem@iabyn.com>
Mon, 25 Mar 2019 20:13:30 +0000 (20:13 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 25 Mar 2019 20:32:21 +0000 (20:32 +0000)
commite40cca748f05c81e1929ed625407afbe7c79d4dd
tree119ea8d63869c611fabfe4401a0836d9a0f5ac39
parent3c2fc529eb398c7f2f197abd633720bd6bb627fc
fix a leak with indented heredocs

With something like

   |print <<~EOF;
   | some data
   |   EOF

it croaks (as it should) with "Indentation ... doesn't match delimiter",
but in that case it leaks the recently malloc()d 'indent' buffer.

The fix is simple.  I've also fixed by code inspection where the code
does 'goto interminable', although I didn't try to reproduce the conditions
where the goto might occur.
toke.c