From 4170cceb520987b6cd78e9d9792f7ec5e902b323 Mon Sep 17 00:00:00 2001 From: Jens Remus Date: Tue, 5 Sep 2017 21:01:52 +0200 Subject: [PATCH] cpuplugd: close config file after use in parse_configfile() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves Cppcheck error: [cpuplugd/config.c:204]: (error) Resource leak: filp Cc: Gerald Schaefer Signed-off-by: Jens Remus Reviewed-by: Jan Höppner Signed-off-by: Jan Höppner --- cpuplugd/config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpuplugd/config.c b/cpuplugd/config.c index 26c79838..4addff1b 100644 --- a/cpuplugd/config.c +++ b/cpuplugd/config.c @@ -3,7 +3,7 @@ * * Config file parsing * - * Copyright IBM Corp. 2007, 2017 + * Copyright IBM Corp. 2007, 2018 * * s390-tools is free software; you can redistribute it and/or modify * it under the terms of the MIT license. See LICENSE for details. @@ -201,6 +201,7 @@ void parse_configfile(char *file) linebuffer); parse_configline(linebuffer); } + fclose(filp); } /*