From 5aec1dc2a11942edd2c1a0bcd74f19133b96e51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B6ppner?= Date: Tue, 21 May 2019 12:52:16 +0200 Subject: [PATCH] cpuplugd: Always free file pointer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The file pointer in the functions is_online() and cpu_is_configured() is only freed in the good case. Make sure it is always freed. Signed-off-by: Jan Höppner --- cpuplugd/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpuplugd/cpu.c b/cpuplugd/cpu.c index 6683fa4b..eda09776 100644 --- a/cpuplugd/cpu.c +++ b/cpuplugd/cpu.c @@ -161,8 +161,8 @@ int is_online(int cpuid) retval = 1; if (state == 0) retval = 0; - fclose(filp); } + fclose(filp); } return retval; } @@ -220,8 +220,8 @@ int cpu_is_configured(int cpuid) retval = 1; if (state == 0) retval = 0; - fclose(filp); } + fclose(filp); } return retval; }