test: vbe: Free the bootflow after use

The bootflow contains fields which are connected to the struct. It
should be freed when it is finished with.

It isn't exactly clear why this fixes the problem, which shows up as:

   => ut -f bootstd vbe_test_abrec_oem_norun
   Test: bootstd_setup_for_tests: bootstd_common.c
   common/dlmalloc.c:793: do_check_free_chunk:
     Assertion `next->prev_size == sz' failed.

Fix it by adding a bootflow_free() at the end, which is good practice in
any case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 07f5b96985 ("boot: test: Add a test for the VBE OS flow")
This commit is contained in:
Simon Glass
2025-08-16 17:03:59 -06:00
parent fdffab6ea9
commit a32b0df1f7

View File

@@ -115,6 +115,7 @@ static int check_abrec_norun(struct unit_test_state *uts, bool use_oem,
root = oftree_root(tree);
ut_asserteq_str("snow", ofnode_read_string(root, "compatible"));
bootflow_free(&bflow);
return 0;
}