From: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
To: thomas@monjalon.net
Cc: dev@dpdk.org, abhinandan.gujjar@intel.com
Subject: [dpdk-dev] [PATCH] ethdev: fix memory leaks in remove rxtx callbacks
Date: Thu, 14 Dec 2017 09:02:23 +0530 [thread overview]
Message-ID: <1513222343-79143-1-git-send-email-abhinandan.gujjar@intel.com> (raw)
The patch frees memory allocated by add rxtx callbacks
Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
lib/librte_ether/rte_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 318af28..2ab6e05 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -3229,6 +3229,7 @@ int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
if (cb == user_cb) {
/* Remove the user cb from the callback list. */
*prev_cb = cb->next;
+ rte_free(cb);
ret = 0;
break;
}
@@ -3263,6 +3264,7 @@ int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
if (cb == user_cb) {
/* Remove the user cb from the callback list. */
*prev_cb = cb->next;
+ rte_free(cb);
ret = 0;
break;
}
--
1.9.1
next reply other threads:[~2017-12-14 9:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 3:32 Abhinandan Gujjar [this message]
2017-12-14 9:16 ` Ananyev, Konstantin
2017-12-14 9:33 ` Gujjar, Abhinandan S
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=1513222343-79143-1-git-send-email-abhinandan.gujjar@intel.com \
--to=abhinandan.gujjar@intel.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/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).