From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Daley Subject: [PATCH 1/3] net/enic: fix flow API memory leak Date: Thu, 27 Sep 2018 18:58:25 -0700 Message-ID: <20180928015827.25786-1-johndale@cisco.com> Cc: dev@dpdk.org, John Daley , stable@dpdk.org, Hyong Youb Kim To: ferruh.yigit@intel.com Return-path: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" rte_flow structures were not being freed when destroyed or flushed. Fixes: 6ced137607d0 ("net/enic: flow API for NICs with advanced filters enabled") Cc: stable@dpdk.org Signed-off-by: Hyong Youb Kim Reviewed-by: John Daley --- drivers/net/enic/enic_flow.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c index 0cf04aefd..9b612f1d5 100644 --- a/drivers/net/enic/enic_flow.c +++ b/drivers/net/enic/enic_flow.c @@ -1532,6 +1532,7 @@ enic_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow, enic_flow_del_filter(enic, flow->enic_filter_id, error); LIST_REMOVE(flow, next); rte_spinlock_unlock(&enic->flows_lock); + rte_free(flow); return 0; } @@ -1555,6 +1556,7 @@ enic_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error) flow = LIST_FIRST(&enic->flows); enic_flow_del_filter(enic, flow->enic_filter_id, error); LIST_REMOVE(flow, next); + rte_free(flow); } rte_spinlock_unlock(&enic->flows_lock); return 0; -- 2.16.2