The patch frees memory allocated by add rxtx callbacks
Signed-off-by: Abhinandan Gujjar <[email protected]>
---
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