app/crypto-perf: fix uninitialized variable
authorAleksander Gajewski <aleksanderx.gajewski@intel.com>
Fri, 10 Feb 2017 09:22:32 +0000 (10:22 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Fri, 10 Feb 2017 15:05:22 +0000 (16:05 +0100)
commit48ae81144f32c3b1edf6ef56bf8643cd710333cb
tree58ce07222cc67465daf64535b1070f62aac5b059
parent5839fd20e7323850f3a411d9b5642d914fa2d3f0
app/crypto-perf: fix uninitialized variable

This commit ixes problem with uninitialized nb_cryptodevs variable by
initialize it with 0 value. Program could jump to err label
without running cperf_initialize_cryptodev() function. Also assign 0
value to nb_cryptodevs after cperf_initialize_cryptodev() when value is
negative.

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

Signed-off-by: Aleksander Gajewski <aleksanderx.gajewski@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
app/test-crypto-perf/main.c