From: Gary Bisson Date: Mon, 11 May 2020 10:11:53 +0000 (+0200) Subject: cmd: avb: free partition buffer upon verify completion X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=b09e1b614949ea9cb426e2e7cf0d2bd65ed7d02d;p=u-boot.git 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 Reviewed-by: Igor Opaniuk --- diff --git a/cmd/avb.c b/cmd/avb.c index 398ad3ba97..88172a9ee6 100644 --- a/cmd/avb.c +++ b/cmd/avb.c @@ -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; }