Memory allocated was not being released in any exit path. Fixes: 48e2255f1b63 ("net/nfp: add NSP support for HW link configuration") Coverity: 195030
Signed-off-by: Alejandro Lucero <alejandro.luc...@netronome.com> --- drivers/net/nfp/nfp_nspu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/nfp/nfp_nspu.c b/drivers/net/nfp/nfp_nspu.c index 0b415fc..f908983 100644 --- a/drivers/net/nfp/nfp_nspu.c +++ b/drivers/net/nfp/nfp_nspu.c @@ -566,6 +566,7 @@ NSP_ETH_TABLE_SIZE, 0); if (ret) { rte_spinlock_unlock(&desc->nsp_lock); + free(entries); return ret; } @@ -586,6 +587,7 @@ if (i == NSP_ETH_MAX_COUNT) { rte_spinlock_unlock(&desc->nsp_lock); + free(entries); return -EINVAL; } @@ -610,6 +612,7 @@ "Hw ethernet port %d configure failed\n", port); } rte_spinlock_unlock(&desc->nsp_lock); + free(entries); return ret; } -- 1.9.1