[v2] app/proc-info: add rte_eal_cleanup() to avoid memory leak
Checks
Commit Message
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, 2 insertions(+), 1 deletion(-)
Comments
On Sun, 4 Sep 2022 17:28:45 +0500
Fidaullah Noonari <fidaullah.noonari@emumba.com> wrote:
> 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
The new eventdev stats could have the same problem.
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
@@ -1523,7 +1523,7 @@ main(int argc, char **argv)
if (mem_info) {
meminfo_display();
- return 0;
+ goto cleanup;
}
nb_ports = rte_eth_dev_count_avail();
@@ -1593,6 +1593,7 @@ main(int argc, char **argv)
RTE_ETH_FOREACH_DEV(i)
rte_eth_dev_close(i);
+cleanup:
ret = rte_eal_cleanup();
if (ret)
printf("Error from rte_eal_cleanup(), %d\n", ret);