Most importantly, don't try HvNAME(gp->gp_hv)
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 29 Jul 2003 10:14:26 +0000 (10:14 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 29 Jul 2003 10:14:26 +0000 (10:14 +0000)
commit13207a7148ab5967a6d91a9acb60e5e292572de2
tree34119d249de911fa88ccd60aa62f4167cb71f9b1
parente2d37721ce786c2356aa09668585a35df28412e9
Most importantly, don't try HvNAME(gp->gp_hv)
unless PL_stashcache exists, otherwise we get
an invalid read (detected by valgrind, and crashes
ext/threads/t/basic.t in Windows).

Also add a few if:s for the refcnt decrements,
no need to call Perl_sv_free() if there's nothing to free.

p4raw-id: //depot/perl@20292
gv.c