graph: fix null dereference in stats
authorHongbo Zheng <zhenghongbo3@huawei.com>
Thu, 6 May 2021 07:16:27 +0000 (15:16 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 3 Jun 2021 16:35:57 +0000 (18:35 +0200)
commit2d2bf7de1afe750984073c4cc81ffa4d95550811
tree5b6e1f8f740cffb37ab45f09ee8cc63620265e91
parent3b47572fbe783ced8264bc7de459121e201c5bef
graph: fix null dereference in stats

In function 'stats_mem_init', pointer 'stats' should
be confirmed not null before memset it.

Fixes: af1ae8b6a32c ("graph: implement stats")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
lib/graph/graph_stats.c