summaryrefslogtreecommitdiff
path: root/ext/strscan/strscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/strscan/strscan.c')
-rw-r--r--ext/strscan/strscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index 6f05ec3666..6b0d8e7c52 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -431,7 +431,7 @@ strscan_do_scan(VALUE self, VALUE regex, int succptr, int getstr, int headonly)
(UChar* )CURPTR(p), (UChar* )(CURPTR(p) + S_RESTLEN(p)),
&(p->regs), ONIG_OPTION_NONE);
}
- if (!tmpreg) RREGEXP(re)->usecnt--;
+ if (!tmpreg) RREGEXP(regex)->usecnt--;
if (tmpreg) {
if (RREGEXP(regex)->usecnt) {
onig_free(re);