diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-05-24 15:21:48 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-05-24 15:21:48 +0000 |
commit | 16580ff596d3844ac4e62fa769c913cc47285a8f (patch) | |
tree | cea76a1c44dfc053f2505d4d5f51d1e4b103ecbf /hv.c | |
parent | 1cf743e1eac3cc540e4c4d1b0d3ee4753fd60329 (diff) | |
download | perl-16580ff596d3844ac4e62fa769c913cc47285a8f.tar.gz |
Leaking is bad, m'kay.
p4raw-id: //depot/perl@24566
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1596,6 +1596,7 @@ S_hfreeentries(pTHX_ HV *hv) HvLAZYDEL_off(hv); hv_free_ent(hv, entry); } + Safefree(iter->xhv_name); Safefree(iter); ((XPVHV*) SvANY(hv))->xhv_aux = 0; } @@ -1772,7 +1773,9 @@ Perl_hv_name_set(pTHX_ HV *hv, const char *name, STRLEN len, int flags) { struct xpvhv_aux *iter = ((XPVHV *)SvANY(hv))->xhv_aux; - if (!iter) { + if (iter) { + Safefree(iter->xhv_name); + } else { if (name == 0) return; |