From: Andrew Rybchenko Date: Wed, 13 Dec 2017 07:12:18 +0000 (+0000) Subject: net/sfc: fix DMA memory leak after kvarg processing failure X-Git-Tag: spdx-start~563 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1883f4b8a5fa87f4d62992127012602c14c312e8;p=dpdk.git net/sfc: fix DMA memory leak after kvarg processing failure Fixes: e56fa9c23e7a ("net/sfc: add kvarg control for MAC statistics update period") 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 d71ec18a6a..6cfd0e30f1 100644 --- a/drivers/net/sfc/sfc_port.c +++ b/drivers/net/sfc/sfc_port.c @@ -404,6 +404,8 @@ sfc_port_attach(struct sfc_adapter *sa) return 0; fail_kvarg_stats_update_period_ms: + sfc_dma_free(sa, &port->mac_stats_dma_mem); + fail_mac_stats_dma_alloc: rte_free(port->mac_stats_buf);