Blame SOURCES/0007-loadconv-Add-missing-fclose.patch
|
|
3709cf |
From 1c97e4df9e01c5f22a12fb6ecce25b4d80fd8f7c Mon Sep 17 00:00:00 2001
|
|
|
3709cf |
From: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
|
|
|
3709cf |
Date: Mon, 13 Aug 2018 14:39:48 +0200
|
|
|
3709cf |
Subject: [PATCH 7/7] loadconv: Add missing fclose()
|
|
|
3709cf |
MIME-Version: 1.0
|
|
|
3709cf |
Content-Type: text/plain; charset=UTF-8
|
|
|
3709cf |
Content-Transfer-Encoding: 8bit
|
|
|
3709cf |
|
|
|
3709cf |
Issue found and reported by David Binderman.
|
|
|
3709cf |
|
|
|
3709cf |
This is a backport of commit f66b5c78.
|
|
|
3709cf |
|
|
|
3709cf |
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
|
|
|
3709cf |
---
|
|
|
3709cf |
src/config.c | 6 ++++--
|
|
|
3709cf |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
3709cf |
|
|
|
3709cf |
diff --git a/src/config.c b/src/config.c
|
|
|
3709cf |
index 36b6e37..0da4989 100644
|
|
|
3709cf |
--- a/src/config.c
|
|
|
3709cf |
+++ b/src/config.c
|
|
|
3709cf |
@@ -1865,6 +1865,7 @@ void doconv(void)
|
|
|
3709cf |
int loadconv(char *buf)
|
|
|
3709cf |
{
|
|
|
3709cf |
FILE *fp;
|
|
|
3709cf |
+ int err = 0;
|
|
|
3709cf |
|
|
|
3709cf |
if ((fp = fopen(pfix_home(buf), "rb")) == (FILE *)NULL) {
|
|
|
3709cf |
werror(_("Cannot open conversion table %s"), pfix_home(buf));
|
|
|
3709cf |
@@ -1874,10 +1875,11 @@ int loadconv(char *buf)
|
|
|
3709cf |
|| fread(vt_outmap, sizeof(vt_outmap), (size_t)1, fp) != 1)
|
|
|
3709cf |
{
|
|
|
3709cf |
werror(_("Cannot read conversion table %s"), pfix_home(buf));
|
|
|
3709cf |
- return 1;
|
|
|
3709cf |
+ err = 1;
|
|
|
3709cf |
}
|
|
|
3709cf |
+
|
|
|
3709cf |
fclose(fp);
|
|
|
3709cf |
- return 0;
|
|
|
3709cf |
+ return err;
|
|
|
3709cf |
}
|
|
|
3709cf |
|
|
|
3709cf |
int saveconv(char *buf)
|
|
|
3709cf |
--
|
|
|
3709cf |
2.14.4
|
|
|
3709cf |
|