diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-01-19 06:08:12 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-01-19 06:08:12 +0200 |
commit | 35c461c3b2c9cc56e22a5360c36b5e6dc9fccd28 (patch) | |
tree | 6692db22a17c1929753555a1fc44d3a2706c4420 /support | |
parent | f7d8956c4fd8324667060933c2c30112e6c80507 (diff) | |
download | egawk-35c461c3b2c9cc56e22a5360c36b5e6dc9fccd28.tar.gz egawk-35c461c3b2c9cc56e22a5360c36b5e6dc9fccd28.tar.bz2 egawk-35c461c3b2c9cc56e22a5360c36b5e6dc9fccd28.zip |
Sync support with GNULIB, fix a dfa memory leak.
Diffstat (limited to 'support')
-rw-r--r-- | support/ChangeLog | 6 | ||||
-rw-r--r-- | support/dfa.c | 1 | ||||
-rw-r--r-- | support/localeinfo.c | 6 | ||||
-rw-r--r-- | support/localeinfo.h | 4 |
4 files changed, 12 insertions, 5 deletions
diff --git a/support/ChangeLog b/support/ChangeLog index e3af1428..027b6db7 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,9 @@ +2017-01-19 Arnold D. Robbins <arnold@skeeve.com> + + * localeinfo.h: Sync with GNULIB. + * localeinfo.c: Ditto. + * dfa.c: Ditto, to fix a memory leak. + 2017-01-16 Arnold D. Robbins <arnold@skeeve.com> * dfa.c: Sync with GNULIB. diff --git a/support/dfa.c b/support/dfa.c index eb8e2136..ad5b3a41 100644 --- a/support/dfa.c +++ b/support/dfa.c @@ -2309,6 +2309,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 diff --git a/support/localeinfo.c b/support/localeinfo.c index ca96afc7..ece679e3 100644 --- a/support/localeinfo.c +++ b/support/localeinfo.c @@ -1,6 +1,6 @@ /* locale information - Copyright 2016 Free Software Foundation, Inc. + Copyright 2016-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -90,10 +90,10 @@ verify (1 + 1 + sizeof lonesome_lower / sizeof *lonesome_lower /* Find the characters equal to C after case-folding, other than C itself, and store them into FOLDED. Return the number of characters - stored. */ + stored; this is zero if C is WEOF. */ int -case_folded_counterparts (wchar_t c, wchar_t folded[CASE_FOLDED_BUFSIZE]) +case_folded_counterparts (wint_t c, wchar_t folded[CASE_FOLDED_BUFSIZE]) { int i; int n = 0; diff --git a/support/localeinfo.h b/support/localeinfo.h index cf2f9a69..a6773f52 100644 --- a/support/localeinfo.h +++ b/support/localeinfo.h @@ -1,6 +1,6 @@ /* locale information - Copyright 2016 Free Software Foundation, Inc. + Copyright 2016-2017 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -51,4 +51,4 @@ extern void init_localeinfo (struct localeinfo *); itself. This is a generous upper bound. */ enum { CASE_FOLDED_BUFSIZE = 32 }; -extern int case_folded_counterparts (wchar_t, wchar_t[CASE_FOLDED_BUFSIZE]); +extern int case_folded_counterparts (wint_t, wchar_t[CASE_FOLDED_BUFSIZE]); |