Skip to content

Commit

Permalink
tests/eal: fix memory leak
Browse files Browse the repository at this point in the history
[ upstream commit 80731e4 ]

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: 45f1b6e ("app: add new tests on eal flags")

Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
Reviewed-by: David Marchand <david.marchand@redhat.com>
  • Loading branch information
Owen Hilyard authored and bluca committed Jul 12, 2021
1 parent e62869e commit 451ead3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/test/test_eal_flags.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 451ead3

Please sign in to comment.