diff options
Diffstat (limited to 'lib/libc/regex/engine.c')
-rw-r--r-- | lib/libc/regex/engine.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c index f97a79b..35bcb5a 100644 --- a/lib/libc/regex/engine.c +++ b/lib/libc/regex/engine.c @@ -255,6 +255,10 @@ int eflags; for (;;) { endp = fast(m, start, stop, gf, gl); if (endp == NULL) { /* a miss */ + if (m->pmatch != NULL) + free((char *)m->pmatch); + if (m->lastpos != NULL) + free((char *)m->lastpos); STATETEARDOWN(m); return(REG_NOMATCH); } |