From 8ae36890ca06bf66972f88d2f44040888ac94c6e Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko Date: Wed, 13 Dec 2017 07:12:17 +0000 Subject: [PATCH] net/sfc: fix multicast address list copy memory leak Fixes: 295f647a38a2 ("net/sfc: set multicast address list in started state only") Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko Reviewed-by: Ivan Malov --- drivers/net/sfc/sfc_port.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c index 55d8d4657c..d71ec18a6a 100644 --- a/drivers/net/sfc/sfc_port.c +++ b/drivers/net/sfc/sfc_port.c @@ -406,7 +406,10 @@ sfc_port_attach(struct sfc_adapter *sa) fail_kvarg_stats_update_period_ms: fail_mac_stats_dma_alloc: rte_free(port->mac_stats_buf); + fail_mac_stats_buf_alloc: + rte_free(port->mcast_addrs); + fail_mcast_addr_list_buf_alloc: sfc_log_init(sa, "failed %d", rc); return rc; @@ -422,6 +425,8 @@ sfc_port_detach(struct sfc_adapter *sa) sfc_dma_free(sa, &port->mac_stats_dma_mem); rte_free(port->mac_stats_buf); + rte_free(port->mcast_addrs); + sfc_log_init(sa, "done"); } -- 2.20.1