From 5cb10fee0bacb6d3cd51f7abda35c4628fddb7f5 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sat, 15 Aug 2015 10:19:45 +0900 Subject: [PATCH] cldr-plurals: Fix trivial resource leak * cldr-plurals.c (main): Close FP after use. Reported by Denis Denisov. --- gettext-tools/src/ChangeLog | 5 +++++ gettext-tools/src/cldr-plurals.c | 1 + 2 files changed, 6 insertions(+) diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 2731e6fbe..4c69e0e3f 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,8 @@ +2015-08-15 Daiki Ueno + + * cldr-plurals.c (main): Close FP after use. + Reported by Denis Denisov. + 2015-07-21 Václav Slavík (tiny change) cldr-plurals: Fix --enable-relocatable compilation diff --git a/gettext-tools/src/cldr-plurals.c b/gettext-tools/src/cldr-plurals.c index 38011fc17..c73ff9637 100644 --- a/gettext-tools/src/cldr-plurals.c +++ b/gettext-tools/src/cldr-plurals.c @@ -434,6 +434,7 @@ There is NO WARRANTY, to the extent permitted by law.\n\ error (1, 0, _("%s cannot be read"), logical_filename); extract_rule (fp, logical_filename, logical_filename, locale); + fclose (fp); if (extracted_rules == NULL) error (1, 0, _("cannot extract rules for %s"), locale); -- 2.47.2