app/bbdev: check memory allocation
authorMin Hu (Connor) <humin29@huawei.com>
Thu, 22 Apr 2021 09:25:05 +0000 (17:25 +0800)
committerAkhil Goyal <gakhil@marvell.com>
Wed, 5 May 2021 13:31:50 +0000 (15:31 +0200)
commitbc4c9418ee0fc22c480c236846af7fbad923ba89
tree5fc07f4e0174d591a42bbaf19b78d49c62fd985b
parent4a8f4f97658d1e3458aa2590ca4b17fdf56126bc
app/bbdev: check memory allocation

Return value of a function 'rte_malloc' is dereferenced without
checking, and may result in segmentation fault.

This patch fixed it.

Fixes: 31a7853d1ed9 ("baseband/turbo_sw: support large size code block")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
app/test-bbdev/test_bbdev_perf.c