From: Owen Hilyard Date: Wed, 16 Jun 2021 16:24:52 +0000 (-0400) Subject: tests/eal: fix memory leak X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=80731e4b5b44036d05ae9b36432b6f2fd9f49d3b;p=dpdk.git 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 --- 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; }