test: nand: Free allocated buffers after test

The run_test_nand() function allocates buf and gold buffers but never
frees them, leaking about 2MB per test run.

Fixes: bc8e8a4bfa ("nand: Add sandbox driver")
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2026-01-03 12:28:42 -07:00
parent 953829e490
commit 30dd519510

View File

@@ -85,6 +85,9 @@ static int run_test_nand(struct unit_test_state *uts, int dev, bool end)
ut_asserteq(size, length);
ut_asserteq_mem(gold, buf, size);
free(buf);
free(gold);
return 0;
}