From 15a6ef550e07348e5ea7b61c1b76ad26deba878d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=80=D0=B0=20=D0=A1=D1=82=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=BD=D0=B0=D1=8F?= Date: Sat, 9 May 2020 20:21:52 +0400 Subject: [PATCH] Add forgotten fclose-s --- src/config.c | 1 + src/main.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/config.c b/src/config.c index 9acac9c..872efd5 100644 --- a/src/config.c +++ b/src/config.c @@ -60,6 +60,7 @@ int config_read(Config* config) { } free(line); + fclose(file); defaults: diff --git a/src/main.c b/src/main.c index 8c4e2c4..dd19b5d 100644 --- a/src/main.c +++ b/src/main.c @@ -55,6 +55,8 @@ float get_temp() { filename, strerror(errno)); fflush(stderr); + + fclose(file); return -1; } @@ -80,6 +82,8 @@ int set_mode(const char* mode) { filename, strerror(errno)); fflush(stderr); + + fclose(file); return -1; }