Since we have modified charjump to be CHAR_MIN-based, we have to
correct the offset when we free it. Caught by: phkmalloc
This commit is contained in:
parent
0b474bc608
commit
6d902efe43
@ -46,6 +46,7 @@ static char sccsid[] = "@(#)regfree.c 8.3 (Berkeley) 3/20/94";
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <regex.h>
|
||||
|
||||
#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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user