summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 9b8dd9058c..f86e276934 100644
--- a/pp.c
+++ b/pp.c
@@ -972,7 +972,8 @@ PP(pp_undef)
if (!sv)
RETPUSHUNDEF;
- SV_CHECK_THINKFIRST_COW_DROP(sv);
+ if (SvTHINKFIRST(sv))
+ sv_force_normal_flags(sv, SV_COW_DROP_PV|SV_IMMEDIATE_UNREF);
switch (SvTYPE(sv)) {
case SVt_NULL: