projects
/
p5sagit/p5-mst-13.2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
b032e88
)
Hash::Util::FieldHash 1.03 leaks SVs which are used as object IDs stored in mg->mg_obj
Goro Fuji [Sat, 28 Feb 2009 10:21:38 +0000 (11:21 +0100)]
ext/Hash-Util-FieldHash/FieldHash.xs
patch
|
blob
|
blame
|
history
ext/Hash-Util-FieldHash/lib/Hash/Util/FieldHash.pm
patch
|
blob
|
blame
|
history
diff --git
a/ext/Hash-Util-FieldHash/FieldHash.xs
b/ext/Hash-Util-FieldHash/FieldHash.xs
index
919a689
..
ccd7c61
100644
(file)
--- 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
25f244a
..
44edd1d
100644
(file)
--- 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);