Skip to contentSkip to conversation

commands/efi/lsefi: Fix memory leak

PATCH In review khaalid cali 2 participants 2 messages May 16, 2025 – May 19, 2025

lore
Share & tools
lore
#0 lore raw

v2 cover commands/efi/lsefi: Fix memory leak

From: khaalid <[email protected]>

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

---
 grub-core/commands/efi/lsefi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/commands/efi/lsefi.c +2 -0
index 016f3eafe..216fe7397 100644
@@ -128,7 +128,7 @@ grub_cmd_lsefi (grub_command_t cmd __attribute__ ((unused)),
 	}
 
     }
+
+  grub_free (handles);
   return 0;
 }
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Reviewed-by on the v2 series
#1 lore raw
Quoted 1 line · khaalid cali

From: khaalid <[email protected]>

Please drop this line. It is not needed...

Additionally, may I ask you to send patches using "git send-email" command?

Quoted 3 lines

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

If you do the above mentioned things you can add

Daniel

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