This commit is contained in:
Kyryl Melekhin
2021-07-19 10:38:02 +00:00
parent 1633ca5c3b
commit 82aaa25bd1
2 changed files with 4 additions and 4 deletions

5
pike.c
View File

@@ -516,6 +516,7 @@ int re_comp(rcode *prog, const char *re, int anchored)
freedsub##nn: \
for (j = 0; j < nsubp; j++) \
s1->sub[j] = sub->sub[j]; \
sub->ref--; \
sub = s1; \
sub->ref = 1; \
} \
@@ -583,11 +584,7 @@ int re_pikevm(rcode *prog, const char *s, const char **subp, int nsubp)
npc += *(npc+1) * 2 + 2;
goto addthread;
case MATCH:
if (matched)
matched->ref = 0;
matched = nsub;
for(i++; i < clist->n; i++)
clist->t[i].sub->ref = 0;
goto BreakFor;
}
nsub->ref--;