summaryrefslogtreecommitdiff
path: root/drivers/net/enic
diff options
context:
space:
mode:
authorJohn Daley <johndale@cisco.com>2018-09-27 20:08:36 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2018-10-11 18:53:48 +0200
commit85b0ccec381d217ad6fb1698317b863a31fdd8af (patch)
treee63048620d5f224659f0239ae36d4601cf0ff1df /drivers/net/enic
parenta9b58b15ed5186fae34fe20faf74be339632bebc (diff)
downloaddpdk-next-eventdev-85b0ccec381d217ad6fb1698317b863a31fdd8af.zip
dpdk-next-eventdev-85b0ccec381d217ad6fb1698317b863a31fdd8af.tar.gz
dpdk-next-eventdev-85b0ccec381d217ad6fb1698317b863a31fdd8af.tar.xz
net/enic: fix flow API memory leak
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 <hyonkim@cisco.com> Signed-off-by: John Daley <johndale@cisco.com>
Diffstat (limited to 'drivers/net/enic')
-rw-r--r--drivers/net/enic/enic_flow.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
index 0cf04ae..9b612f1 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;