From e0e362e7b14ea938be1a157ff64d0be15350dbc1 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 file changed, 1 insertion(+) diff --git a/lib/dfa.c b/lib/dfa.c index f6c3017014..5bac288db9 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 -- 2.39.5