From: Ferruh Yigit Date: Sun, 28 Oct 2018 01:08:45 +0000 (+0000) Subject: service: fix possible null access X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c8b506e4b661c23264debc66f52c7270f903a00e;p=dpdk.git service: fix possible null access Fixes: 21698354c832 ("service: introduce service cores concept") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit Acked-by: Harry van Haaren --- diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c index 8767c72250..0f3695c4b5 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -795,6 +795,9 @@ rte_service_dump_one(FILE *f, struct rte_service_spec_impl *s, return; } + if (f == NULL) + return; + fprintf(f, " %s: stats %d\tcalls %"PRIu64"\tcycles %" PRIu64"\tavg: %"PRIu64"\n", s->spec.name, service_stats_enabled(s), s->calls,