Skip to content

commands/efi: Fix sevral memory leaks

khaalid cali grub-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2disk/efi/efidisk: Fix memory leakgrub-core/disk/efi/efidisk.c+6 -00 replies
2/2loader/efi/linux: Fix memory leakgrub-core/loader/efi/linux.c+4 -10 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDaniel Kiper
SeriesR-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] commands/efi: Fix sevral memory leaks

"handles" that "grub_efi_locate_handles" was allocated with "grub_malloc" wasn't being freed.

---
 grub-core/commands/efi/lsefi.c | 1 +
 grub-core/commands/efi/tpm.c   | 2 ++
 2 files changed, 3 insertions(+)
grub-core/commands/efi/lsefi.c +1 -0
index 7b8316d41..68561f9b6 100644
@@ -129,6 +129,7 @@ grub_cmd_lsefi (grub_command_t cmd __attribute__ ((unused)),
 
     }
 
+    grub_free (handles);
   return 0;
 }
 
grub-core/commands/efi/tpm.c +2 -0
index cbac69866..cb39b7bba 100644
@@ -112,6 +112,7 @@ grub_tpm_handle_find (grub_efi_handle_t *tpm_handle,
       grub_tpm_version = 1;
       *protocol_version = 1;
       grub_dprintf ("tpm", "TPM handle Found, version: 1\n");
+      grub_free (handles);
       return 1;
     }
 
@@ -124,6 +125,7 @@ grub_tpm_handle_find (grub_efi_handle_t *tpm_handle,
       grub_tpm_version = 2;
       *protocol_version = 2;
       grub_dprintf ("tpm", "TPM handle Found, version: 2\n");
+      grub_free (handles);
       return 1;
     }
 
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel