From 2fb8cd26a90be74643bcb4bc39da01f84fecb1a9 Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Sun, 12 Feb 2017 09:23:34 +0300 Subject: [PATCH] script: fix double free in lexer yylex_destroy() already frees scanner. Found by: Coverity scan. CID: 176636 --- grub-core/script/lexer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/grub-core/script/lexer.c b/grub-core/script/lexer.c index 89cf67706..c6bd3172f 100644 --- a/grub-core/script/lexer.c +++ b/grub-core/script/lexer.c @@ -251,7 +251,6 @@ grub_script_lexer_init (struct grub_parser_param *parser, char *script, { parser->lexerstate = 0; yylex_destroy (lexerstate->yyscanner); - grub_free (lexerstate->yyscanner); grub_free (lexerstate->text); grub_free (lexerstate); return 0;