X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_metrics%2Frte_metrics.c;h=99a96b651c5ef8123299cb867480f1b23c6c1b34;hb=f3a5fa85cfd191522baa8cc144c9d95e7e658972;hp=038f58bf8456c6aeb3e6690a74a49fa9fec1a9da;hpb=a84bdf6a101f2ab3c3859a40f366962d78c12868;p=dpdk.git diff --git a/lib/librte_metrics/rte_metrics.c b/lib/librte_metrics/rte_metrics.c index 038f58bf84..99a96b651c 100644 --- a/lib/librte_metrics/rte_metrics.c +++ b/lib/librte_metrics/rte_metrics.c @@ -96,6 +96,9 @@ rte_metrics_reg_names(const char * const *names, uint16_t cnt_names) /* Some sanity checks */ if (cnt_names < 1 || names == NULL) return -EINVAL; + for (idx_name = 0; idx_name < cnt_names; idx_name++) + if (names[idx_name] == NULL) + return -EINVAL; memzone = rte_memzone_lookup(RTE_METRICS_MEMZONE_NAME); if (memzone == NULL)