From f4ee890e9e6feda32d908e2a437239ec71c959be Mon Sep 17 00:00:00 2001 From: rpm-build Date: Dec 09 2020 22:50:52 +0000 Subject: 0007-loadconv-Add-missing-fclose.patch patch_name: 0007-loadconv-Add-missing-fclose.patch present_in_specfile: true location_in_specfile: 7 --- diff --git a/src/config.c b/src/config.c index 36b6e37..0da4989 100644 --- a/src/config.c +++ b/src/config.c @@ -1865,6 +1865,7 @@ void doconv(void) int loadconv(char *buf) { FILE *fp; + int err = 0; if ((fp = fopen(pfix_home(buf), "rb")) == (FILE *)NULL) { werror(_("Cannot open conversion table %s"), pfix_home(buf)); @@ -1874,10 +1875,11 @@ int loadconv(char *buf) || fread(vt_outmap, sizeof(vt_outmap), (size_t)1, fp) != 1) { werror(_("Cannot read conversion table %s"), pfix_home(buf)); - return 1; + err = 1; } + fclose(fp); - return 0; + return err; } int saveconv(char *buf)