summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2022-09-26 15:03:50 +1000
committerTony Cook <tony@develop-help.com>2022-11-02 09:35:07 +1100
commita1aa0ce969357a471f335bc9f9362f49f178b1fe (patch)
treea7a5b2e33e8d7480ce3b47a90e0e4548a93f8a6b /sv.c
parent8720ab89901b4674570b078a259b3749153f0283 (diff)
downloadperl-a1aa0ce969357a471f335bc9f9362f49f178b1fe.tar.gz
We freed PL_splitstr in each thread, allocate it in each thread too
I also fixed const correctness for PL_splitstr, it was initialized to " " which required it to be const, but the value is only looked at when PL_minus_F is true, so it wasn't necessary. So initialize it to NULL, and duplicate the value in threads.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 6d839f54a0..3aefe070c7 100644
--- a/sv.c
+++ b/sv.c
@@ -15569,7 +15569,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_minus_c = proto_perl->Iminus_c;
PL_localpatches = proto_perl->Ilocalpatches;
- PL_splitstr = proto_perl->Isplitstr;
+ PL_splitstr = SAVEPV(proto_perl->Isplitstr);
PL_minus_n = proto_perl->Iminus_n;
PL_minus_p = proto_perl->Iminus_p;
PL_minus_l = proto_perl->Iminus_l;