diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-11-15 17:00:52 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-11-15 17:00:52 -0800 |
commit | ecbbcad639528457f99648a7a5576d629350122e (patch) | |
tree | 038380c6a01255b245a81be55c45b8896c97d69b /hv.c | |
parent | 47f1cf770212f10b8ffbc1777e95c1dbfe120c9d (diff) | |
download | perl-ecbbcad639528457f99648a7a5576d629350122e.tar.gz |
Fix memory leak introduced by 2d0d1eccfcfe
If HvENAME was set by a destructor, it needs to be freed as well.
hv_name_set(whatever, NULL, ...) does that.
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1855,8 +1855,8 @@ Perl_hv_undef(pTHX_ HV *hv) if (SvOOK(hv)) { struct xpvhv_aux * const aux = HvAUX(hv); struct mro_meta *meta; - if ((name = HvNAME(hv))) { - if (PL_stashcache) + if (aux->xhv_name) { + if (PL_stashcache && (name = HvNAME(hv))) (void)hv_delete(PL_stashcache, name, HvNAMELEN_get(hv), G_DISCARD); hv_name_set(hv, NULL, 0, 0); } |