From a7a491c8236e9d5f8229ef8095ad50ac81dd66db Mon Sep 17 00:00:00 2001 From: dcs Date: Sat, 8 Jul 2000 09:45:17 +0000 Subject: Since we have modified charjump to be CHAR_MIN-based, we have to correct the offset when we free it. Caught by: phkmalloc --- lib/libc/regex/regfree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libc/regex') diff --git a/lib/libc/regex/regfree.c b/lib/libc/regex/regfree.c index cd6b3dc..4266d1c 100644 --- a/lib/libc/regex/regfree.c +++ b/lib/libc/regex/regfree.c @@ -46,6 +46,7 @@ static char sccsid[] = "@(#)regfree.c 8.3 (Berkeley) 3/20/94"; #include #include #include +#include #include #include "utils.h" @@ -79,7 +80,7 @@ regex_t *preg; if (g->must != NULL) free(g->must); if (g->charjump != NULL) - free(g->charjump); + free(&g->charjump[CHAR_MIN]); if (g->matchjump != NULL) free(g->matchjump); free((char *)g); -- cgit v1.1