DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] tests/test_eal_flags: fix memory leak
@ 2021-06-16 16:24 ohilyard
  2021-06-16 16:37 ` David Marchand
  2021-06-24 13:26 ` David Marchand
  0 siblings, 2 replies; 4+ messages in thread
From: ohilyard @ 2021-06-16 16:24 UTC (permalink / raw)
  To: david.marchand; +Cc: dev, Owen Hilyard

From: Owen Hilyard <ohilyard@iol.unh.edu>

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 <ohilyard@iol.unh.edu>
---
 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


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

end of thread, other threads:[~2021-06-24 13:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 16:24 [dpdk-dev] [PATCH] tests/test_eal_flags: fix memory leak ohilyard
2021-06-16 16:37 ` David Marchand
2021-06-16 16:50   ` David Marchand
2021-06-24 13:26 ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).