mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] test: ramfs: close opened directory
@ 2025-11-27  8:02 Sascha Hauer
  2025-11-28  7:11 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2025-11-27  8:02 UTC (permalink / raw)
  To: Barebox List

The directory opened with opendir() is never closed. Call closedir() to
avoid memory leaks.

Signed-off-by: Sascha Hauer <s.hauer@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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-28  7:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-27  8:02 [PATCH] test: ramfs: close opened directory Sascha Hauer
2025-11-28  7:11 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox