3 Jan
2026
3 Jan
'26
8:04 p.m.
From: Simon Glass <simon.glass@canonical.com> The run_test_nand() function allocates buf and gold buffers but never frees them, leaking about 2MB per test run. Fixes: bc8e8a4bfa0f ("nand: Add sandbox driver") Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- (no changes since v1) test/dm/nand.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/dm/nand.c b/test/dm/nand.c index c7e09850503..ec58815ecdb 100644 --- a/test/dm/nand.c +++ b/test/dm/nand.c @@ -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; } -- 2.43.0