From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Martin Spinler <spinler@cesnet.cz>
Subject: [PATCH] net/nfb: fix eth_node memory leak in deinit
Date: Wed, 18 Feb 2026 10:16:21 -0800 [thread overview]
Message-ID: <20260218181621.1066237-1-stephen@networkplumber.org> (raw)
The eth_node array allocated with calloc() in nfb_nc_eth_init() is
freed on the error path but not in the normal teardown path via
nfb_nc_eth_deinit(). Add the missing free().
Fixes: 9b173c0f89 ("net/nfb: get correct link speed")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/nfb/nfb_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c
index e267dca9af..ba7c849a4b 100644
--- a/drivers/net/nfb/nfb_ethdev.c
+++ b/drivers/net/nfb/nfb_ethdev.c
@@ -186,6 +186,7 @@ nfb_nc_eth_deinit(struct pmd_internals *intl)
for (i = 0; i < intl->max_rxmac; i++)
nc_rxmac_close(intl->rxmac[i]);
+ free(intl->eth_node);
free(intl->txmac);
free(intl->rxmac);
}
--
2.51.0
next reply other threads:[~2026-02-18 18:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-18 18:16 Stephen Hemminger [this message]
2026-02-19 6:17 ` [PATCH] net/nfb: fix eth_node memory leak in deinit Martin Spinler
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=20260218181621.1066237-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=spinler@cesnet.cz \
/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