summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/hv.c b/hv.c
index 2468e87839..3e0bed21a0 100644
--- a/hv.c
+++ b/hv.c
@@ -339,23 +339,16 @@ HV *hv;
xhv = (XPVHV*)SvANY(hv);
hfreeentries(hv);
Safefree(xhv->xhv_array);
+ if (HvNAME(hv)) {
+ Safefree(HvNAME(hv));
+ HvNAME(hv) = 0;
+ }
xhv->xhv_array = 0;
xhv->xhv_max = 7; /* it's a normal associative array */
xhv->xhv_fill = 0;
(void)hv_iterinit(hv); /* so each() will start off right */
}
-void
-hv_free(hv)
-register HV *hv;
-{
- if (!hv)
- return;
- hfreeentries(hv);
- Safefree(HvARRAY(hv));
- Safefree(hv);
-}
-
I32
hv_iterinit(hv)
HV *hv;