summaryrefslogtreecommitdiff
path: root/pp_sort.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-06-24 20:44:07 +0100
committerNicholas Clark <nick@ccl4.org>2010-06-24 20:44:07 +0100
commit133acf7b389614db651d1ed570d4a0ca0c747999 (patch)
treebc91d9b208195abeb8a27f7c56d10994d30d3ab9 /pp_sort.c
parentc941595168829d86ac7d2e0fa00a891d42f5d96e (diff)
downloadperl-133acf7b389614db651d1ed570d4a0ca0c747999.tar.gz
In pp_sort, ensure that @_ is freed correctly.
Before this, if @_ had become AvREAL(), it retains reference on its elements.
Diffstat (limited to 'pp_sort.c')
-rw-r--r--pp_sort.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pp_sort.c b/pp_sort.c
index 51cf216a62..48d4273e23 100644
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1678,9 +1678,9 @@ PP(pp_sort)
sort_flags);
if (!(flags & OPf_SPECIAL)) {
- LEAVESUB(cv);
- if (!is_xsub)
- CvDEPTH(cv)--;
+ SV *sv;
+ POPSUB(cx, sv);
+ LEAVESUB(sv);
}
POPBLOCK(cx,PL_curpm);
PL_stack_sp = newsp;