From e31a5c639909d9631048e72e62b7b33651b58486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Fri, 1 Oct 2021 18:13:38 +0200 Subject: [PATCH] checkpolicy: cleanup lexer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Göttsche --- checkpolicy/parse_util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/checkpolicy/parse_util.c b/checkpolicy/parse_util.c index b00d7535c7..c62c37b225 100644 --- a/checkpolicy/parse_util.c +++ b/checkpolicy/parse_util.c @@ -26,6 +26,7 @@ extern FILE *yyin; extern void init_parser(int); extern int yyparse(void); extern void yyrestart(FILE *); +extern int yylex_destroy(void); extern queue_t id_queue; extern unsigned int policydb_errors; extern policydb_t *policydbp; @@ -59,6 +60,7 @@ int read_source_policy(policydb_t * p, const char *file, const char *progname) progname); queue_destroy(id_queue); fclose(yyin); + yylex_destroy(); return -1; } rewind(yyin); @@ -71,11 +73,13 @@ int read_source_policy(policydb_t * p, const char *file, const char *progname) progname); queue_destroy(id_queue); fclose(yyin); + yylex_destroy(); return -1; } - queue_destroy(id_queue); + queue_destroy(id_queue); fclose(yyin); + yylex_destroy(); return 0; }