diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-06-07 16:09:54 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-06-07 16:09:54 +0000 |
commit | 6499cc01a61ed62809d392d9c843f37a021fbc35 (patch) | |
tree | b9ae77167190ae7348dbe80208278adba435aa52 /regcomp.c | |
parent | 02255c606d03ddedf1941776619d3260891f7b92 (diff) | |
download | perl-6499cc01a61ed62809d392d9c843f37a021fbc35.tar.gz |
Plug a memory leak (noticed by Yves)
p4raw-id: //depot/perl@31352
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4883,7 +4883,9 @@ Perl_reg_named_buff_exists(pTHX_ REGEXP * const rx, SV * const key, if (flags & RXf_HASH_ALL) { return hv_exists_ent(rx->paren_names, key, 0); } else { - if (CALLREG_NAMED_BUFF_FETCH(rx, key, flags)) { + SV *sv = CALLREG_NAMED_BUFF_FETCH(rx, key, flags); + if (sv) { + SvREFCNT_dec(sv); return TRUE; } else { return FALSE; |