lsefi: fixed memory leaks
PATCH v2 2/2 lsefi: fixed memory leaks
--- grub-core/commands/efi/lsefi.c | 4 ++++ 1 file changed, 4 insertions(+)
grub-core/commands/efi/lsefi.c +4 -0
@@ -186,8 +186,12 @@ grub_cmd_lsefi (grub_command_t cmd __attribute__ ((unused)), (unsigned) protocols[j]->data4[7]); } +if (protocols) +grub_efi_free_pool (protocols); } +grub_free (handles); +return 0 ; }
Signature · 1 line
2.34.1
Please ignore, deprecated by "efi: new 'connectefi' command" (v3).
Sorry for the mess.
Le 2/14/22 à 14:25, Renaud Métrich a écrit :
Quoted 22 lines
Signed-off-by Renaud Métrich <[email protected]>--- grub-core/commands/efi/lsefi.c | 4 ++++ 1 file changed, 4 insertions(+)grub-core/commands/efi/lsefi.c +4
-0@@ -186,8 +186,12 @@ grub_cmd_lsefi (grub_command_t cmd __attribute__ ((unused)), (unsigned) protocols[j]->data4[7]); } +if (protocols) +grub_efi_free_pool (protocols); } +grub_free (handles); +return 0 ; }
Quoted 1 line · On Tue, 15 Feb 2022 14:07:15 +0100 Renaud Métrich <[email protected]> wrote:
Please ignore, deprecated by "efi: new 'connectefi' command" (v3).
I'm not sure what was eactly wrong with v3 (haven't looked at the difference). However, v3 was done better in some regards. On this list it is customary to have multi-patch series both threaded and with a cover letter, as was done in v3.
v2 is confusing because there are apparently 3 patches, 2 of which are duplicates (or so it seems from the subject). Of the 3 patches two are threaded, but one is on its own thread.
For a patch series such as this, it is recommended to use git format-patches --thread and --cover-letter options and have a brief explanation of the series in the cover letter. I also like to use either --range-diff or --interdiff (as appropriate) when not the first version of the patch series.
So if there is some problem with the actual changes in v3, I recommend creating a v4 incorporating the above suggestions.
Glenn
Quoted 26 lines
Sorry for the mess.
Le 2/14/22 à 14:25, Renaud Métrich a écrit :
Quoted 22 lines
Signed-off-by Renaud Métrich <[email protected]>--- grub-core/commands/efi/lsefi.c | 4 ++++ 1 file changed, 4 insertions(+)grub-core/commands/efi/lsefi.c +4
-0@@ -186,8 +186,12 @@ grub_cmd_lsefi (grub_command_t cmd __attribute__ ((unused)), (unsigned) protocols[j]->data4[7]); } +if (protocols) +grub_efi_free_pool (protocols); } +grub_free (handles); +return 0 ; }