summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-02-07 21:46:59 +0000
committerNicholas Clark <nick@ccl4.org>2004-02-07 21:46:59 +0000
commit754604c44e26572c47a2c15665bf1009e9e5b219 (patch)
treecb12520da5374cfae9410024dfd0091eba19444d /hv.c
parente0e97dbabd467d4797d6138693db9ab58187faf3 (diff)
downloadperl-754604c44e26572c47a2c15665bf1009e9e5b219.tar.gz
deleting keys in restricted hashes was leaking the entry. Yow!
p4raw-id: //depot/perl@22281
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hv.c b/hv.c
index 097b599508..669e55a407 100644
--- a/hv.c
+++ b/hv.c
@@ -1005,6 +1005,7 @@ S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
* an error.
*/
if (SvREADONLY(hv)) {
+ SvREFCNT_dec(HeVAL(entry));
HeVAL(entry) = &PL_sv_placeholder;
/* We'll be saving this slot, so the number of allocated keys
* doesn't go down, but the number placeholders goes up */