From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id A17AC2BCE for ; Thu, 14 Dec 2017 10:02:23 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Dec 2017 01:02:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,400,1508828400"; d="scan'208";a="2310498" Received: from unknown (HELO localhost.localdomain) ([10.224.122.195]) by fmsmga007.fm.intel.com with ESMTP; 14 Dec 2017 01:02:20 -0800 From: Abhinandan Gujjar To: thomas@monjalon.net Cc: dev@dpdk.org, abhinandan.gujjar@intel.com Date: Thu, 14 Dec 2017 09:02:23 +0530 Message-Id: <1513222343-79143-1-git-send-email-abhinandan.gujjar@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH] ethdev: fix memory leaks in remove rxtx callbacks X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2017 09:02:24 -0000 The patch frees memory allocated by add rxtx callbacks Signed-off-by: Abhinandan Gujjar --- 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