DragonFly submit List (threaded) for 2005-01
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
libc/regexp memory leak
from FreeBSD http://www.freebsd.org/cgi/query-pr.cgi?pr=75656
--- /usr/src/lib/libc/regex/engine.c.orig 2005-01-08
01:49:14.000000000 +0000
+++ /usr/src/lib/libc/regex/engine.c 2005-01-08 01:49:42.000000000 +0000
@@ -239,6 +239,10 @@
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);
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]