summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorMike Guy <mjtg@cam.ac.uk>2000-09-01 15:16:01 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2000-09-01 13:47:54 +0000
commitfd345fa8ff2d2c9d4bea826848c63a12821897de (patch)
treee205bcdef783f4f944bf684ce1841ef4197f67c3 /mg.c
parentc4d24d4c39d926df3531cb26fe44cea326bfa244 (diff)
downloadperl-fd345fa8ff2d2c9d4bea826848c63a12821897de.tar.gz
Part of the solution.
Subject: Re: [ID 20000807.004] [PATCH] conditional breakpoints leak memory Message-Id: <E13Uqfp-0006dN-00@draco.cus.cam.ac.uk> p4raw-id: //depot/perl@6967
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mg.c b/mg.c
index 088ae0b742..7712cace8d 100644
--- a/mg.c
+++ b/mg.c
@@ -292,7 +292,8 @@ Perl_mg_copy(pTHX_ SV *sv, SV *nsv, const char *key, I32 klen)
for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) {
if (isUPPER(mg->mg_type)) {
sv_magic(nsv,
- mg->mg_type == 'P' ? SvTIED_obj(sv, mg) : mg->mg_obj,
+ mg->mg_type == 'P' ? SvTIED_obj(sv, mg) :
+ (mg->mg_type == 'D' && mg->mg_obj) ? sv : mg->mg_obj,
toLOWER(mg->mg_type), key, klen);
count++;
}