script: fix double free in lexer

yylex_destroy() already frees scanner.

Found by: Coverity scan.
CID: 176636
This commit is contained in:
Andrei Borzenkov 2017-02-12 09:23:34 +03:00
parent 529818738f
commit 2fb8cd26a9

View file

@ -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;