This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
remove leak in tr/ascii/utf8/
authorDavid Mitchell <davem@iabyn.com>
Tue, 12 Nov 2019 15:34:55 +0000 (15:34 +0000)
committerDavid Mitchell <davem@iabyn.com>
Tue, 12 Nov 2019 15:34:55 +0000 (15:34 +0000)
commitecfd8588da8b6d2b74d6476d4d1c9e40c7de8b8c
tree07c2383d509bb5afd6e4c407a1b1523faff9dc47
parentf0206e819891ea9f375f3443e0a4d3ccf02acac8
remove leak in tr/ascii/utf8/

The recent change to use invlists left a bug in S_do_trans_invmap()
whereby it allocated a new temp buf if it knew the resulting string
would be too long, but failed to free the buffer at the end.

Showed up as smokes under ASAN failing these tests:

    op/tr_latin1.t
    op/tr.t
    uni/tr_utf8.t
doop.c