diff options
author | Gary Bisson <gary.bisson@boundarydevices.com> | 2020-05-11 12:11:53 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-05-19 14:01:47 -0400 |
commit | b09e1b614949ea9cb426e2e7cf0d2bd65ed7d02d (patch) | |
tree | 45efc945769f2dc390588d8adfa917540d678f2a | |
parent | cf2d07f004367e7b48fb1d21a31a0818adb0374a (diff) | |
download | u-boot-b09e1b614949ea9cb426e2e7cf0d2bd65ed7d02d.tar.gz u-boot-b09e1b614949ea9cb426e2e7cf0d2bd65ed7d02d.tar.bz2 u-boot-b09e1b614949ea9cb426e2e7cf0d2bd65ed7d02d.zip |
cmd: avb: free partition buffer upon verify completion
Doing the same as the unittests for libavb [1].
Allows to run 'avb verify' multiple times which can be useful after a
failure to be able to re-flash the partition and try again.
[1]
https://android.googlesource.com/platform/external/avb/+/refs/tags/android-9.0.0_r37/test/avb_slot_verify_unittest.cc#156
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
-rw-r--r-- | cmd/avb.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -316,6 +316,9 @@ int do_avb_verify_part(struct cmd_tbl *cmdtp, int flag, printf("Unknown error occurred\n"); } + if (out_data) + avb_slot_verify_data_free(out_data); + return res; } |