Close file handle left opened if parser.cfg is found and read from.
Found by cppcheck.

Signed-off-by: Steve Beattie <[email protected]>
---
 parser/parser_main.c |    1 +
 1 file changed, 1 insertion(+)

Index: b/parser/parser_main.c
===================================================================
--- a/parser/parser_main.c
+++ b/parser/parser_main.c
@@ -602,6 +602,7 @@ static int process_config_file(const cha
 
        while ((c = getopt_long_file(f, long_options, &optarg, &o)) != -1)
                process_arg(c, optarg);
+       fclose(f);
        return 1;
 }
 


-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to