]> Savannah Git Hosting - gnulib.git/commitdiff
dfa: fix memory leak in parse
authorNorihiro Tanaka <noritnk@kcn.ne.jp>
Wed, 18 Jan 2017 22:44:13 +0000 (07:44 +0900)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 19 Jan 2017 00:44:41 +0000 (16:44 -0800)
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

index f6c3017014655fc7ede8af88b7fc1ef30dba878c..5bac288db9e40f976fd1b30321c5e811e9d1dff7 100644 (file)
--- 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