We read the boot image to a fixed partition which is defined
in boot header, this part of memory should not be freed with
free() otherwise "Synchronous Abort" error may happen.
Change-Id: I0fd9a3e558fda90c4daeee3080e4f9b393e11d98
Signed-off-by: Luo Ji <ji.luo@nxp.com>
fail:
if (slot_data != NULL) {
- avb_slot_verify_data_free(slot_data);
+ /* the address of bootimage isn't alloced by malloc,
+ * we should not free it. */
+ avb_slot_verify_data_free_fast(slot_data);
}
return ret;
}
for (n = 0; n < 2; n++) {
if (slot_data[n] != NULL) {
- avb_slot_verify_data_free(slot_data[n]);
+ /* the address of bootimage isn't alloced by malloc,
+ * we should not free it. */
+ avb_slot_verify_data_free_fast(slot_data[n]);
}
}
*out_data = data;
} else {
if (data != NULL) {
- /* the address of bootimage isn't alloced by malloc,
- * we should not free it. */
- avb_slot_verify_data_free_fast(data);
+ avb_slot_verify_data_free(data);
}
}