DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] app: fix Coverity issues
@ 2016-06-20 13:49 Remy Horton
  2016-06-20 13:56 ` Thomas Monjalon
  2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 0/2] " Remy Horton
  0 siblings, 2 replies; 10+ 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] 10+ messages in thread
* [dpdk-dev] [PATCH 0/6] fix i40e problematic dereference
@ 2016-04-21  3:42 Helin Zhang
  2016-06-26 15:46 ` [dpdk-dev] [PATCH v2 0/2] fix coverity issues Helin Zhang
  0 siblings, 1 reply; 10+ 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] 10+ messages in thread

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-20 13:49 [dpdk-dev] [PATCH v1] app: fix Coverity issues Remy Horton
2016-06-20 13:56 ` Thomas Monjalon
2016-06-20 14:50   ` Remy Horton
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 0/2] " Remy Horton
2016-06-20 15:23   ` [dpdk-dev] [PATCH v2 1/2] app/test-pmd: " Remy Horton
2016-06-20 15:33     ` De Lara Guarch, Pablo
2016-06-20 15:23   ` [dpdk-dev] [PATCH v2 2/2] examples/l2fwd-keepalive: " Remy Horton
2016-06-21 13:58   ` [dpdk-dev] [PATCH v2 0/2] " Thomas Monjalon
  -- strict thread matches above, loose matches on Subject: below --
2016-04-21  3:42 [dpdk-dev] [PATCH 0/6] fix i40e problematic dereference Helin Zhang
2016-06-26 15:46 ` [dpdk-dev] [PATCH v2 0/2] fix coverity issues Helin Zhang
2016-06-28 12:01   ` Bruce Richardson

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).