diff options
author | Goro Fuji <g.psy.va@gmail.com> | 2009-02-28 11:21:38 +0100 |
---|---|---|
committer | Vincent Pit <perl@profvince.com> | 2009-02-28 11:23:08 +0100 |
commit | f72763ca64e82790f7457efc913f314774e50590 (patch) | |
tree | 8dbfa9fe0da0cfa9e3cd644b890c731fe9d07d48 /ext/Hash-Util-FieldHash | |
parent | b032e88887f6cb0115394c9072b0279fba6d76b4 (diff) | |
download | perl-f72763ca64e82790f7457efc913f314774e50590.tar.gz |
Hash::Util::FieldHash 1.03 leaks SVs which are used as object IDs stored in mg->mg_obj
Diffstat (limited to 'ext/Hash-Util-FieldHash')
-rw-r--r-- | ext/Hash-Util-FieldHash/FieldHash.xs | 1 | ||||
-rw-r--r-- | ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ext/Hash-Util-FieldHash/FieldHash.xs b/ext/Hash-Util-FieldHash/FieldHash.xs index 919a6891f0..ccd7c61ea4 100644 --- a/ext/Hash-Util-FieldHash/FieldHash.xs +++ b/ext/Hash-Util-FieldHash/FieldHash.xs @@ -82,6 +82,7 @@ SV* HUF_obj_id(SV* obj) { id = HUF_OBJ_ID(item); mg = sv_magicext(item, id, PERL_MAGIC_ext, NULL, NULL, 0); mg->mg_private = HUF_IDCACHE; + SvREFCNT_dec(id); /* refcnt++ in sv_magicext() */ /* Return the object ID */ return id; diff --git a/ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm b/ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm index 25f244aba5..44edd1d6e5 100644 --- a/ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm +++ b/ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm @@ -5,7 +5,7 @@ use strict; use warnings; use Scalar::Util qw( reftype); -our $VERSION = '1.03'; +our $VERSION = '1.03_01'; require Exporter; our @ISA = qw(Exporter); |