app/testpmd: fix division by zero on socket memory dump
authorMin Hu (Connor) <humin29@huawei.com>
Mon, 26 Apr 2021 11:57:57 +0000 (19:57 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 29 Apr 2021 13:34:39 +0000 (15:34 +0200)
commita767951e597964e6c02529097edd2b43b5aace4d
tree646190aa16495839a8aed48ff1d9b26f45e16869
parentcf30a78593cc8d5644a576a03477f3bf10feba67
app/testpmd: fix division by zero on socket memory dump

Variable total, which may be zero and result in segmentation fault.

This patch fixed it.

Fixes: 9b1249d9ff69 ("app/testpmd: support dumping socket memory")
Cc: stable@dpdk.org
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/cmdline.c