From c0e63a3b831cb64775c5f9695c5da242ab993898 Mon Sep 17 00:00:00 2001 From: dcs Date: Sun, 2 Jul 2000 15:58:54 +0000 Subject: Fix memory leak introduced with regcomp.c rev 1.14. --- lib/libc/regex/regfree.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') diff --git a/lib/libc/regex/regfree.c b/lib/libc/regex/regfree.c index 580fb75..cd6b3dc 100644 --- a/lib/libc/regex/regfree.c +++ b/lib/libc/regex/regfree.c @@ -35,6 +35,8 @@ * SUCH DAMAGE. * * @(#)regfree.c 8.3 (Berkeley) 3/20/94 + * + * $FreeBSD$ */ #if defined(LIBC_SCCS) && !defined(lint) @@ -76,5 +78,9 @@ regex_t *preg; free((char *)g->setbits); if (g->must != NULL) free(g->must); + if (g->charjump != NULL) + free(g->charjump); + if (g->matchjump != NULL) + free(g->matchjump); free((char *)g); } -- cgit v1.1