Thread (4 messages) 4 messages, 2 authors, 2021-06-24

[dpdk-dev] [PATCH] tests/test_eal_flags: fix memory leak

From: <hidden>
Date: 2021-06-16 16:24:58
Subsystem: the rest · Maintainer: Linus Torvalds

From: Owen Hilyard <redacted>

The directory steam was not closed when the hugepage action was
HUGEPAGE_CHECK_EXISTS. This caused a memory leak in some parts of
the unit tests.

Signed-off-by: Owen Hilyard <redacted>
---
 app/test/test_eal_flags.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index 932fbe3d0..0c1e0fb21 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -125,6 +125,7 @@ process_hugefiles(const char * prefix, enum hugepage_action action)
 				{
 					/* file exists, return */
 					result = 1;
+					closedir(hugepage_dir);
 					goto end;
 				}
 				break;
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help