DPDK patches and discussions
 help / color / mirror / Atom feed
From: Fidaullah Noonari <fidaullah.noonari@emumba.com>
To: maryam.tahhan@intel.com
Cc: dev@dpdk.org, Fidaullah Noonari <fidaullah.noonari@emumba.com>
Subject: [PATCH] app/proc-info: add rte_eal_cleanup() to avoid memory leak
Date: Thu, 18 Aug 2022 16:37:42 +0500	[thread overview]
Message-ID: <20220818113742.138791-1-fidaullah.noonari@emumba.com> (raw)

when app is launched with -m proc-info exit without
rte_eal_cleanup() causing memory leakage. This commit resolves the
memory leakage issue and closes app properly.

Bugzilla id: 898

Signed-off-by: Fidaullah Noonari <fidaullah.noonari@emumba.com>
---
 app/proc-info/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 1bfba5f60d..44a946045e 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -1523,6 +1523,9 @@ main(int argc, char **argv)
 
 	if (mem_info) {
 		meminfo_display();
+		ret = rte_eal_cleanup();
+		if (ret != 0)
+			printf("Error from rte_eal_cleanup(), %d\n", ret);
 		return 0;
 	}
 
-- 
2.25.1


             reply	other threads:[~2022-08-18 11:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 11:37 Fidaullah Noonari [this message]
2022-08-18 14:53 ` Stephen Hemminger

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=20220818113742.138791-1-fidaullah.noonari@emumba.com \
    --to=fidaullah.noonari@emumba.com \
    --cc=dev@dpdk.org \
    --cc=maryam.tahhan@intel.com \
    /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).