summaryrefslogtreecommitdiffstats
path: root/src/vlib/counter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/counter.c')
-rw-r--r--src/vlib/counter.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vlib/counter.c b/src/vlib/counter.c
index 4f375dee938..9f14d02909f 100644
--- a/src/vlib/counter.c
+++ b/src/vlib/counter.c
@@ -108,7 +108,10 @@ vlib_free_simple_counter (vlib_simple_counter_main_t * cm)
vec_free (cm->counters);
}
else
- vlib_stats_remove_entry (cm->stats_entry_index);
+ {
+ vlib_stats_remove_entry (cm->stats_entry_index);
+ cm->counters = NULL;
+ }
}
void
@@ -176,7 +179,10 @@ vlib_free_combined_counter (vlib_combined_counter_main_t * cm)
vec_free (cm->counters);
}
else
- vlib_stats_remove_entry (cm->stats_entry_index);
+ {
+ vlib_stats_remove_entry (cm->stats_entry_index);
+ cm->counters = NULL;
+ }
}
u32