summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-07-21 00:37:32 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-07-21 00:37:32 +0000
commited6c1d6b44d8ffac74beba8dcd7c0393a8698b0d (patch)
tree9b97b831668d4238c9e835ab337cbd2ef9f3ef2f /scope.c
parent3070f6ec3ff16a55374e9cfa04154bb3486d1b59 (diff)
downloadperl-ed6c1d6b44d8ffac74beba8dcd7c0393a8698b0d.tar.gz
fix memory leak in C<local(*foo) = 'bar'>
p4raw-id: //depot/perl@1584
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scope.c b/scope.c
index 4df5f2e9ea..1008ab1437 100644
--- a/scope.c
+++ b/scope.c
@@ -673,7 +673,7 @@ leave_scope(I32 base)
case SAVEt_GP: /* scalar reference */
ptr = SSPOPPTR;
gv = (GV*)SSPOPPTR;
- if (SvPOK(gv) && SvLEN(gv) > 0) {
+ if (SvPVX(gv) && SvLEN(gv) > 0) {
Safefree(SvPVX(gv));
}
SvPVX(gv) = (char *)SSPOPPTR;