From: Andrew Rybchenko Date: Wed, 13 Dec 2017 07:12:17 +0000 (+0000) Subject: net/sfc: fix multicast address list copy memory leak X-Git-Tag: spdx-start~564 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8ae36890ca06bf66972f88d2f44040888ac94c6e;p=dpdk.git 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 --- 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"); }