Fix memory leak introduced with regcomp.c rev 1.14.

This commit is contained in:
Daniel C. Sobral 2000-07-02 15:58:54 +00:00
parent 0c6094e49b
commit a5378e623a

View File

@ -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);
}