mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 07:12:39 +00:00
efi: Fix several memory leaks of UEFI handles
Fix possible and absolute memory leaks of "handles" returned by grub_efi_locate_handle() using grub_malloc(). Signed-off-by: Khalid Ali <khaliidcaliy@gmail.com> Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
c477a95519
commit
0f0899c329
4 files changed
+6
-3
No files matched your search
@@ -113,6 +113,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;
|
||||
}
|
||||
|
||||
@@ -125,6 +126,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user