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

* Re: [dpdk-dev] [PATCH] tests/test_eal_flags: fix memory leak
  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
  1 sibling, 1 reply; 4+ messages in thread
From: David Marchand @ 2021-06-16 16:37 UTC (permalink / raw)
  To: Owen Hilyard; +Cc: dev

On Wed, Jun 16, 2021 at 6:26 PM <ohilyard@iol.unh.edu> wrote:
>
> 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>

Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


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

* Re: [dpdk-dev] [PATCH] tests/test_eal_flags: fix memory leak
  2021-06-16 16:37 ` David Marchand
@ 2021-06-16 16:50   ` David Marchand
  0 siblings, 0 replies; 4+ messages in thread
From: David Marchand @ 2021-06-16 16:50 UTC (permalink / raw)
  To: Owen Hilyard; +Cc: dev

On Wed, Jun 16, 2021 at 6:37 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Wed, Jun 16, 2021 at 6:26 PM <ohilyard@iol.unh.edu> wrote:
> >
> > 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.

Just forgot to ask for a Fixes: tag.
I guess this is:
Fixes: 45f1b6e8680a ("app: add new tests on eal flags")

I will add it when applying.

-- 
David Marchand


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

* Re: [dpdk-dev] [PATCH] tests/test_eal_flags: fix memory leak
  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-24 13:26 ` David Marchand
  1 sibling, 0 replies; 4+ messages in thread
From: David Marchand @ 2021-06-24 13:26 UTC (permalink / raw)
  To: Owen Hilyard; +Cc: dev

On Wed, Jun 16, 2021 at 6:26 PM <ohilyard@iol.unh.edu> wrote:
>
> 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.
>

Fixes: 45f1b6e8680a ("app: add new tests on eal flags")
Cc: stable@dpdk.org


> Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks.


-- 
David Marchand


^ 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).