summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-11-18 18:36:12 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-11-18 20:17:19 -0800
commit4aca0fe60f57f806473daef9c7357107f75f684f (patch)
tree1cd578f6e71b5addd6a1011bbabdb273fe822648 /utf8.c
parentcc34d8c5166167fcc3b2144eab4efb369901f305 (diff)
downloadperl-4aca0fe60f57f806473daef9c7357107f75f684f.tar.gz
Stop \P{Assigned} from leaking
I suspect this leak also applies to any large character classes. An HV created with newHV has a reference count of 1, so doing newRV_inc on it will cause a leak.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index 62b9135c03..829db7dcfc 100644
--- a/utf8.c
+++ b/utf8.c
@@ -2982,7 +2982,7 @@ Perl__core_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 m
* we are going to return a swash */
if ((int) _invlist_len(invlist) > invlist_swash_boundary) {
swash_hv = newHV();
- retval = newRV_inc(MUTABLE_SV(swash_hv));
+ retval = newRV_noinc(MUTABLE_SV(swash_hv));
}
swash_invlist = invlist;
}