From: Swarup Nayak Date: Mon, 11 Dec 2017 14:38:57 +0000 (+0530) Subject: ONE-33 "one statistics flush" throws assert when one counter not added X-Git-Tag: v18.04-rc0~75 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F00%2F9800%2F1;p=vpp.git ONE-33 "one statistics flush" throws assert when one counter not added Change-Id: Id10f10889c3036a6db21c999c1e6c54fc1770213 Signed-off-by: Swarup Nayak --- diff --git a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c index ca1e320700e..f810ae5fec4 100644 --- a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c +++ b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c @@ -1289,6 +1289,9 @@ vnet_lisp_flush_stats (void) vlib_combined_counter_main_t *cm = &lgm->counters; u32 i; + if (cm->counters == NULL) + return 0; + for (i = 0; i < vlib_combined_counter_n_counters (cm); i++) vlib_zero_combined_counter (cm, i);