summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2018-02-23 04:13:49 +0100
committerYves Orton <demerphq@gmail.com>2018-02-23 10:31:04 +0100
commit910a6a8be166fb3780dcd2520e3526e537383ef2 (patch)
tree2162c5316380a419085d0bdf42740775ccf766ff /regcomp.c
parentc99363aa273278adcad39f32026629b700f9bbc3 (diff)
downloadperl-910a6a8be166fb3780dcd2520e3526e537383ef2.tar.gz
perl #132892: avoid leak by mortalizing temporary copy of pattern
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regcomp.c b/regcomp.c
index 34ac9169f2..446f0bf839 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -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));
}
}