From bf31594410e18b7761d5536d692ea6762871e833 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 18 Feb 2017 21:30:03 +0100 Subject: [PATCH] conf: close file --- libnfc/conf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libnfc/conf.c b/libnfc/conf.c index 149173a..85a49cf 100644 --- a/libnfc/conf.c +++ b/libnfc/conf.c @@ -168,7 +168,7 @@ parse_line(const char line[BUFSIZ], char **key, char **value) return -1; } -static bool +static void conf_parse_file(const char *filename, void (*conf_keyvalue)(void *data, const char *key, const char *value), void *data) @@ -176,7 +176,7 @@ conf_parse_file(const char *filename, FILE *f = fopen(filename, "r"); if (!f) { log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_INFO, "Unable to open file: %s", filename); - return false; + return; } char line[BUFSIZ]; @@ -200,7 +200,8 @@ conf_parse_file(const char *filename, } } } - return false; + fclose(f); + return; } static void