DPDK patches and discussions
 help / color / mirror / Atom feed
From: ohilyard@iol.unh.edu
To: david.marchand@redhat.com
Cc: dev@dpdk.org, Owen Hilyard <ohilyard@iol.unh.edu>
Subject: [dpdk-dev] [PATCH] tests/test_eal_flags: fix memory leak
Date: Wed, 16 Jun 2021 12:24:52 -0400	[thread overview]
Message-ID: <20210616162453.349614-1-ohilyard@iol.unh.edu> (raw)

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


             reply	other threads:[~2021-06-16 16:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16 16:24 ohilyard [this message]
2021-06-16 16:37 ` David Marchand
2021-06-16 16:50   ` David Marchand
2021-06-24 13:26 ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210616162453.349614-1-ohilyard@iol.unh.edu \
    --to=ohilyard@iol.unh.edu \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).