Skip to content

Commit

Permalink
Fix leak in error path
Browse files Browse the repository at this point in the history
Signed-off-by: Ross Lagerwall <[email protected]>
  • Loading branch information
rosslagerwall authored and vathpela committed Jan 21, 2025
1 parent 992b6d3 commit 31e1fce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shim.c
Original file line number Diff line number Diff line change
Expand Up @@ -1493,8 +1493,10 @@ load_cert_file(EFI_HANDLE image_handle, CHAR16 *filename, CHAR16 *PathName)
return efi_status;

efi_status = verify_image(data, datasize, shim_li, &context);
if (EFI_ERROR(efi_status))
if (EFI_ERROR(efi_status)) {
FreePool(data);
return efi_status;
}

Section = context.FirstSection;
for (i = 0; i < context.NumberOfSections; i++, Section++) {
Expand Down

0 comments on commit 31e1fce

Please sign in to comment.