app/crypto-perf: check memory allocation
authorMin Hu (Connor) <humin29@huawei.com>
Thu, 6 May 2021 06:13:59 +0000 (14:13 +0800)
committerAkhil Goyal <gakhil@marvell.com>
Wed, 12 May 2021 16:14:19 +0000 (18:14 +0200)
commit37c0359bc550e0cf3938382553c7dbb4fb21567d
tree03f23e9009c32d68df2fbc250c8b401ec1543153
parent5cce3bd6b2fc9e272a8defc7b8971a96232d4529
app/crypto-perf: check memory allocation

Return value of a function 'rte_zmalloc' is dereferenced without
checking, and it may call segmentation fault.

This patch fixed it.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
app/test-crypto-perf/cperf_options_parsing.c