DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/6] fix i40e problematic dereference
@ 2016-04-21  3:42 Helin Zhang
  2016-04-21  3:42 ` [dpdk-dev] [PATCH 1/6] i40e: fix " Helin Zhang
                   ` (9 more replies)
  0 siblings, 10 replies; 27+ messages in thread
From: Helin Zhang @ 2016-04-21  3:42 UTC (permalink / raw)
  To: dev; +Cc: Helin Zhang

It fixes several problematic dereferences in i40e driver,
reported by Coverity.

Helin Zhang (6):
  i40e: fix problematic dereference
  i40e: fix problematic dereference
  i40e: fix problematic dereference
  i40e: fix problematic dereference
  i40e: fix problematic dereference
  i40e: fix problematic dereference

 drivers/net/i40e/i40e_pf.c   |  7 +++----
 drivers/net/i40e/i40e_rxtx.c | 18 +++++++++++-------
 2 files changed, 14 insertions(+), 11 deletions(-)

-- 
2.5.0

^ permalink raw reply	[flat|nested] 27+ messages in thread
* [dpdk-dev] [PATCH v1] app: fix Coverity issues
@ 2016-06-20 13:49 Remy Horton
  2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 0/2] " Remy Horton
  0 siblings, 1 reply; 27+ messages in thread
From: Remy Horton @ 2016-06-20 13:49 UTC (permalink / raw)
  To: pablo.de.lara.guarch; +Cc: dev

Fixes memory leaks detected by Coverity. These are due to ephemeral
memory allocations not being freed when errors occur.

Coverity issue 127348: Resource leak
Coverity issue 127349: Resource leak

Fixes: e2aae1c1ced9 ("ethdev: remove name from extended statistic fetch")

Signed-off-by: Remy Horton <remy.horton@intel.com>
---
 app/test-pmd/config.c          | 3 +++
 examples/l2fwd-keepalive/shm.c | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 10f0a36..cb71c09 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -281,6 +281,7 @@ nic_xstats_display(portid_t port_id)
 	if (cnt_xstats != rte_eth_xstats_get_names(
 			port_id, xstats_names, cnt_xstats)) {
 		printf("Error: Cannot get xstats lookup\n");
+		free(xstats_names);
 		return;
 	}
 
@@ -293,6 +294,8 @@ nic_xstats_display(portid_t port_id)
 	}
 	if (cnt_xstats != rte_eth_xstats_get(port_id, xstats, cnt_xstats)) {
 		printf("Error: Unable to get xstats\n");
+		free(xstats_names);
+		free(xstats);
 		return;
 	}
 
diff --git a/examples/l2fwd-keepalive/shm.c b/examples/l2fwd-keepalive/shm.c
index 66fc433..177aa5b 100644
--- a/examples/l2fwd-keepalive/shm.c
+++ b/examples/l2fwd-keepalive/shm.c
@@ -80,6 +80,8 @@ struct rte_keepalive_shm *rte_keepalive_shm_create(void)
 				RTE_LOG(INFO, EAL,
 					"Failed to setup SHM semaphore (%s)\n",
 					strerror(errno));
+				munmap(ka_shm,
+					sizeof(struct rte_keepalive_shm));
 				return NULL;
 			}
 
-- 
2.5.5

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

end of thread, other threads:[~2016-06-28 12:01 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-21  3:42 [dpdk-dev] [PATCH 0/6] fix i40e problematic dereference Helin Zhang
2016-04-21  3:42 ` [dpdk-dev] [PATCH 1/6] i40e: fix " Helin Zhang
2016-04-21 16:10   ` Stephen Hemminger
2016-04-22  1:04     ` Zhang, Helin
2016-04-21  3:42 ` [dpdk-dev] [PATCH 2/6] " Helin Zhang
2016-04-21  3:42 ` [dpdk-dev] [PATCH 3/6] " Helin Zhang
2016-04-21  3:42 ` [dpdk-dev] [PATCH 4/6] " Helin Zhang
2016-04-21  3:42 ` [dpdk-dev] [PATCH 5/6] " Helin Zhang
2016-04-21  3:42 ` [dpdk-dev] [PATCH 6/6] " Helin Zhang
2016-04-21 10:06 ` [dpdk-dev] [PATCH 0/6] fix i40e " Thomas Monjalon
2016-04-21 12:49   ` Zhang, Helin
2016-04-21 12:51     ` Thomas Monjalon
2016-04-21 11:01 ` Bruce Richardson
2016-04-21 12:50   ` Zhang, Helin
2016-04-25  5:44 ` [dpdk-dev] [PATCH v2] i40e: fix " Helin Zhang
2016-04-25  9:41   ` Bruce Richardson
2016-04-28  3:17   ` [dpdk-dev] [PATCH v3 0/2] fix Coverity reported issues Helin Zhang
2016-04-28  3:17   ` [dpdk-dev] [PATCH v3 1/2] i40e: fix problematic dereference Helin Zhang
2016-04-28  3:17   ` [dpdk-dev] [PATCH v3 2/2] i40e: fix missing break in switch Helin Zhang
2016-06-26 15:46 ` [dpdk-dev] [PATCH v2 0/2] fix coverity issues Helin Zhang
2016-06-26 15:46   ` [dpdk-dev] [PATCH v2 1/2] i40e: fix problematic dereference Helin Zhang
2016-06-26 20:04     ` Mcnamara, John
2016-06-26 15:46   ` [dpdk-dev] [PATCH v2 2/2] i40e: fix missing break in switch Helin Zhang
2016-06-26 20:04     ` Mcnamara, John
2016-06-28 12:01   ` [dpdk-dev] [PATCH v2 0/2] fix coverity issues Bruce Richardson
2016-06-20 13:49 [dpdk-dev] [PATCH v1] app: fix Coverity issues Remy Horton
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 0/2] " Remy Horton
2016-06-21 13:58   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).