summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vlib/error.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vlib/error.c b/src/vlib/error.c
index 7f69140abe2..7d502d777a3 100644
--- a/src/vlib/error.c
+++ b/src/vlib/error.c
@@ -131,11 +131,12 @@ vlib_register_errors (vlib_main_t * vm,
if (n->n_errors > 0)
heap_dealloc (em->counters_heap, n->error_heap_handle);
+ n->n_errors = n_errors;
+ n->error_counters = counters;
+
if (n_errors == 0)
return;
- n->n_errors = n_errors;
-
/* Legacy node */
if (!counters)
{
@@ -149,8 +150,6 @@ vlib_register_errors (vlib_main_t * vm,
}
}
- n->error_counters = counters;
-
n->error_heap_index =
heap_alloc (em->counters_heap, n_errors, n->error_heap_handle);
l = vec_len (em->counters_heap);