diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-04-10 11:48:07 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-04-10 11:48:07 +0000 |
commit | 1cdf7faf9fb9e7feb64bb63a4448c8361e406417 (patch) | |
tree | ca439d5b230acdd825acd3c71fbc4acd78b638b0 /op.c | |
parent | 154a3f59ee199673e70f3fe43432e9d672630a16 (diff) | |
download | perl-1cdf7faf9fb9e7feb64bb63a4448c8361e406417.tar.gz |
If PL_curpm is pointing to an op that is getting freed, reset it to
NULL. Otherwise we have a pointer dangling into undefined behaviour.
p4raw-id: //depot/perl@30888
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -663,6 +663,8 @@ S_forget_pmop(pTHX_ PMOP *const o, U32 flags) } } } + if (PL_curpm == o) + PL_curpm = NULL; if (flags) PmopSTASH_free(o); } |