From 80731e4b5b44036d05ae9b36432b6f2fd9f49d3b Mon Sep 17 00:00:00 2001 From: Owen Hilyard Date: Wed, 16 Jun 2021 12:24:52 -0400 Subject: [PATCH] tests/eal: fix memory leak 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. Fixes: 45f1b6e8680a ("app: add new tests on eal flags") Cc: stable@dpdk.org Signed-off-by: Owen Hilyard Reviewed-by: David Marchand --- 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 932fbe3d08..b4880ee802 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -124,6 +124,7 @@ process_hugefiles(const char * prefix, enum hugepage_action action) case HUGEPAGE_CHECK_EXISTS: { /* file exists, return */ + closedir(hugepage_dir); result = 1; goto end; } -- 2.20.1