app/testpmd: fix allocation check in TM config
authorJasvinder Singh <jasvinder.singh@intel.com>
Mon, 22 Jan 2018 15:45:53 +0000 (15:45 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 31 Jan 2018 22:34:47 +0000 (23:34 +0100)
commit9e70fce2e1cfb5f5061272b3051c5a95cf0a1ef5
tree2c876b8b2e9178fdaaf43e1adcd889e936a0fe80
parent0c36b7c4908865622a9eb8b1017eb96ba114e9e7
app/testpmd: fix allocation check in TM config

Calloc() function might returns NULL due to insufficient space. Therefore,
check for handling memory allocation failure is added.

Coverity issue: 257030
Fixes: 5b590fbe09b6 ("app/testpmd: add traffic management forwarding mode")
Cc: stable@dpdk.org
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
app/test-pmd/tm.c