metrics: disallow null as metric name
authorRemy Horton <remy.horton@intel.com>
Mon, 2 Jul 2018 13:46:08 +0000 (14:46 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 26 Jul 2018 18:30:18 +0000 (20:30 +0200)
commit219731302a0aa5b8edb30a6bc1cdea64e7824a98
tree5c9fda54be637c1dd0f62f4dcf22d7d8ecbe6365
parenta84bdf6a101f2ab3c3859a40f366962d78c12868
metrics: disallow null as metric name

This patch adds a sanity check so that names passed into
rte_metrics_reg_names() and the wrapper rte_metrics_reg_name()
cannot be NULL.

Fixes: 349950ddb9c5 ("metrics: add information metrics library")
Cc: stable@dpdk.org
Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
lib/librte_metrics/rte_metrics.c