diff options
author | Tony Cook <tony@develop-help.com> | 2019-09-02 15:35:36 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2019-09-02 15:35:36 +1000 |
commit | 05a03c0da6f3694904885fa1629a6e35e75d2875 (patch) | |
tree | 167beb37f816c7f25daca2a515386d4f0e98918c /regexec.c | |
parent | e99ccafab27dc0d084a8c16ed5a07fe8f4cc87ce (diff) | |
download | perl-05a03c0da6f3694904885fa1629a6e35e75d2875.tar.gz |
(perl #134390) don't leak the SV we just created on an early return
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -10405,6 +10405,7 @@ S_to_byte_substr(pTHX_ regexp *prog) && !prog->substrs->data[i].substr) { SV* sv = newSVsv(prog->substrs->data[i].utf8_substr); if (! sv_utf8_downgrade(sv, TRUE)) { + SvREFCNT_dec_NN(sv); return FALSE; } if (SvVALID(prog->substrs->data[i].utf8_substr)) { |