DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/test-crypto-perf: fix uninitialized scalar variable
@ 2017-02-07  9:21 Aleksander Gajewski
  2017-02-09 22:55 ` De Lara Guarch, Pablo
  2017-02-10  9:22 ` [dpdk-dev] [PATCH v2] " Aleksander Gajewski
  0 siblings, 2 replies; 5+ messages in thread
From: Aleksander Gajewski @ 2017-02-07  9:21 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev, Aleksander Gajewski

Fix problem with uninitialized nb_cryptodevs variable by
initialize it with 0 value. Program could jump to err label
without running cperf_initialize_cryptodev() function.

Coverity issue: 141073
Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test
application")

Signed-off-by: Aleksander Gajewski <aleksanderx.gajewski@intel.com>
---
 app/test-crypto-perf/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 6c128d8..035021a 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -264,7 +264,7 @@
 
 	void *ctx[RTE_MAX_LCORE] = { };
 
-	int nb_cryptodevs;
+	int nb_cryptodevs = 0;
 	uint8_t cdev_id, i;
 	uint8_t enabled_cdevs[RTE_CRYPTO_MAX_DEVS] = { 0 };
 
-- 
1.9.1

--------------------------------------------------------------------

Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-07  9:21 [dpdk-dev] [PATCH] app/test-crypto-perf: fix uninitialized scalar variable Aleksander Gajewski
2017-02-09 22:55 ` De Lara Guarch, Pablo
2017-02-10  9:22 ` [dpdk-dev] [PATCH v2] " Aleksander Gajewski
2017-02-10  9:47   ` De Lara Guarch, Pablo
2017-02-10 11:05     ` De Lara Guarch, Pablo

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