From 3479bce8542f75c11e6b0b9907e22b26d91865ca Mon Sep 17 00:00:00 2001 From: Norihiro Tanaka Date: Thu, 19 Jan 2017 07:44:13 +0900 Subject: [PATCH] dfa: fix memory leak in parse Problem reported by Arnold Robbins in: http://lists.gnu.org/archive/html/bug-grep/2017-01/msg00006.html * lib/dfa.c (epsclosure): Do it. --- lib/dfa.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/dfa.c b/lib/dfa.c index f6c3017..5bac288 100644 --- a/lib/dfa.c +++ b/lib/dfa.c @@ -2262,6 +2262,7 @@ epsclosure (position_set *initial, struct dfa const *d) replace (initial, i, &d->follows[i], constraint, &tmp); } + free (tmp.elems); } /* Returns the set of contexts for which there is at least one -- 1.7.1