On Tue, May 13, 2025 at 11:01:36AM +0000, khaalid cali wrote:
> From: khaalid <khaliidca...@gmail.com>

You can drop this if it is your patch.

> It was forgotten to free `handles` array of handles returned by

Please use " instead of ` and/or '.

> `grub_efi_locate_handle`. This is quite a large amount of memory, it depends 
> how many handles being returned which can be hundrends.

Please wrap lines more or less at 80 characters.

> Signed-off-by: Khalid Ali <khaliidca...@gmail.com>
> ---
>  grub-core/commands/efi/lsefi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/grub-core/commands/efi/lsefi.c b/grub-core/commands/efi/lsefi.c
> index 7b8316d41..016f3eafe 100644
> --- a/grub-core/commands/efi/lsefi.c
> +++ b/grub-core/commands/efi/lsefi.c
> @@ -128,7 +128,7 @@ grub_cmd_lsefi (grub_command_t cmd __attribute__ 
> ((unused)),
>       }
>
>      }
> -
> +    grub_free(handles);

Good catch!

Could you fix indention and add space before "("? [1]

Additionally, I can see similar issues around grub_efi_locate_handle()
calls in other places too, e.g., grub-core/commands/efi/tpm.c. Could you
fix that too? You can do that in the same patch.

>    return 0;
>  }

Daniel

[1] https://www.gnu.org/software/grub/manual/grub-dev/grub-dev.html#Coding-style

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to