Fix memory leak introduced with regcomp.c rev 1.14.
This commit is contained in:
parent
0c6094e49b
commit
a5378e623a
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user