* [PATCH] script: fix double free in lexer
@ 2017-02-11 20:52 Andrei Borzenkov
2017-02-11 21:59 ` Vladimir 'phcoder' Serbinenko
0 siblings, 1 reply; 2+ messages in thread
From: Andrei Borzenkov @ 2017-02-11 20:52 UTC (permalink / raw)
To: grub-devel
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 89cf677..c6bd317 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;
--
tg: (5298187..) coverity/176636 (depends on: master)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] script: fix double free in lexer
2017-02-11 20:52 [PATCH] script: fix double free in lexer Andrei Borzenkov
@ 2017-02-11 21:59 ` Vladimir 'phcoder' Serbinenko
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2017-02-11 21:59 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 944 bytes --]
Go ahead
On Sat, 11 Feb 2017, 21:53 Andrei Borzenkov <arvidjaar@gmail.com> wrote:
> 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 89cf677..c6bd317 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;
> --
> tg: (5298187..) coverity/176636 (depends on: master)
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: Type: text/html, Size: 1985 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-11 21:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-11 20:52 [PATCH] script: fix double free in lexer Andrei Borzenkov
2017-02-11 21:59 ` Vladimir 'phcoder' Serbinenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.