Re: [PATCH] legacycfg.c: avoid closing file twice

2024-10-24 Thread Daniel Kiper
On Wed, Oct 16, 2024 at 11:54:38AM -0600, Leo Sandoval wrote: > An Internal (at Red Hat) static soure code scan detected the issue below, > pointing to an use-after-free scenario so remove the extra file close > call. > > Error: USE_AFTER_FREE (CWE-416): > grub-2.06/grub-core/commands/legac

[PATCH] legacycfg.c: avoid closing file twice

2024-10-16 Thread Leo Sandoval
An Internal (at Red Hat) static soure code scan detected the issue below, pointing to an use-after-free scenario so remove the extra file close call. Error: USE_AFTER_FREE (CWE-416): grub-2.06/grub-core/commands/legacycfg.c:194: freed_arg: "grub_file_close" frees "file". grub-2.06/gru