aboot: mdtp: allocate mdtp_fbimage instance on heap instead of data segment
Allocates mdtp_fbimage instance on heap because data segment is to small
to contain it.
Change-Id: I0afe3ed0fa13e54a6153dfe442b7ac1ff72dcc80
diff --git a/app/aboot/mdtp.c b/app/aboot/mdtp.c
index 3db1d21..578f4de 100644
--- a/app/aboot/mdtp.c
+++ b/app/aboot/mdtp.c
@@ -62,6 +62,7 @@
int check_aboot_addr_range_overlap(uint32_t start, uint32_t size);
int scm_random(uint32_t * rbuf, uint32_t r_len);
+void free_mdtp_image(void);
/********************************************************************************/
@@ -422,7 +423,7 @@
// Valid PIN - deactivate and continue boot
dprintf(SPEW, "mdtp: display_recovery_ui: valid PIN, continue boot\n");
write_deactivated_DIP();
- return;
+ goto out;
}
else
{
@@ -440,6 +441,9 @@
dprintf(CRITICAL, "mdtp: display_recovery_ui: Local deactivation disabled, unable to display recovery UI\n");
display_error_msg(); /* This will never return */
}
+
+ out:
+ free_mdtp_image();
}
/* Verify the boot or recovery partitions using boot_verifier. */