diff options
author | Ji Luo <ji.luo@nxp.com> | 2019-02-22 09:54:08 +0800 |
---|---|---|
committer | Ji Luo <ji.luo@nxp.com> | 2019-02-22 09:54:08 +0800 |
commit | 698574fb422f00275947d086bc37f3a9a3a226a2 (patch) | |
tree | d34de72c2d28a3ceee22ccb6e29a27a6dce095f3 /lib | |
parent | 557a2e5d0ea2235b1c3547f6feaa19f032e24a7c (diff) |
MA-14121 Only free hash buffer for Android Auto
The hash buffer is allocated on stack if we don't use
CAAM to accelerate the hash calculation, don't free
the hash buffer in such case.
Test: Boot ok on imx8qm.
Change-Id: I3b3dcc0e8359848b4f9c58c802d51f0a76931e5e
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/avb/libavb/avb_slot_verify.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/avb/libavb/avb_slot_verify.c b/lib/avb/libavb/avb_slot_verify.c index 8651dfb0ed..5733f2fa6c 100644 --- a/lib/avb/libavb/avb_slot_verify.c +++ b/lib/avb/libavb/avb_slot_verify.c @@ -388,8 +388,10 @@ static AvbSlotVerifyResult load_and_verify_hash_partition( out: +#if defined(CONFIG_IMX_TRUSTY_OS) && !defined(CONFIG_AVB_ATX) if (digest != NULL) free(digest); +#endif /* If it worked and something was loaded, copy to slot_data. */ if ((ret == AVB_SLOT_VERIFY_RESULT_OK || result_should_continue(ret)) && image_buf != NULL) { |