All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/nfp: release memory before exit
@ 2017-11-08 14:42 Alejandro Lucero
  2017-11-10  9:38 ` [dpdk-stable] " Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Lucero @ 2017-11-08 14:42 UTC (permalink / raw)
  To: dev; +Cc: stable

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.lucero@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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH] net/nfp: release memory before exit
  2017-11-08 14:42 [PATCH] net/nfp: release memory before exit Alejandro Lucero
@ 2017-11-10  9:38 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2017-11-10  9:38 UTC (permalink / raw)
  To: Alejandro Lucero, dev; +Cc: stable

On 11/8/2017 6:42 AM, Alejandro Lucero wrote:
> 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.lucero@netronome.com>

Applied to dpdk/master, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-10  9:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08 14:42 [PATCH] net/nfp: release memory before exit Alejandro Lucero
2017-11-10  9:38 ` [dpdk-stable] " Ferruh Yigit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.