[PATCH] test: ramfs: close opened directory
Sascha Hauer
s.hauer at pengutronix.de
Thu Nov 27 00:02:44 PST 2025
The directory opened with opendir() is never closed. Call closedir() to
avoid memory leaks.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
test/self/ramfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test/self/ramfs.c b/test/self/ramfs.c
index 3fb3812cb6..f0535fe558 100644
--- a/test/self/ramfs.c
+++ b/test/self/ramfs.c
@@ -86,6 +86,8 @@ static void test_tree(const char *path, struct test_tree_ctx *ctx)
}
+ closedir(dir);
+
popd(oldwd);
}
--
2.47.3
More information about the barebox
mailing list