diff options
author | Yves Orton <demerphq@gmail.com> | 2018-02-23 04:13:49 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2018-02-23 10:31:04 +0100 |
commit | 910a6a8be166fb3780dcd2520e3526e537383ef2 (patch) | |
tree | 2162c5316380a419085d0bdf42740775ccf766ff /regcomp.c | |
parent | c99363aa273278adcad39f32026629b700f9bbc3 (diff) | |
download | perl-910a6a8be166fb3780dcd2520e3526e537383ef2.tar.gz |
perl #132892: avoid leak by mortalizing temporary copy of pattern
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6515,8 +6515,8 @@ S_concat_pat(pTHX_ RExC_state_t * const pRExC_state, pat = msv; } else { /* a string with no trailing null, we need to copy it - * so it we have a trailing null */ - pat = newSVsv(msv); + * so it has a trailing null */ + pat = sv_2mortal(newSVsv(msv)); } } |