From e2986b198fecfa43694b625667c43b78ea24d688 Mon Sep 17 00:00:00 2001 From: saloniamatteo Date: Sat, 20 Mar 2021 10:46:56 +0100 Subject: [PATCH] Free pointer to file --- src/modules/locale.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/modules/locale.c b/src/modules/locale.c index cccc58cbc..d9402b05a 100644 --- a/src/modules/locale.c +++ b/src/modules/locale.c @@ -12,6 +12,7 @@ void ffPrintLocale(FFinstance* instance) char localeCode[256]; FILE *fp; + /* Try to open /etc/locale.conf in read-only mode */ fp = fopen("/etc/locale.conf", "r"); /* File does not exist */ @@ -21,13 +22,8 @@ void ffPrintLocale(FFinstance* instance) ffParsePropFile("/etc/locale.conf", "LANG=%[^\n]", localeCode); } - /* - if(localeCode[0] == '\0' && ffStrbufIsEmpty(&instance->config.localeFormat)) - { - ffPrintError(instance, "Locale", "\"LANG=%[^\\n]\" not found in \"/etc/locale.conf\""); - return; - } - */ + /* Free pointer to file */ + fclose(fp); ffPrintLogoAndKey(instance, "Locale");