aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vlib/buffer.c4
-rw-r--r--src/vlib/threads.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index 133d640d693..3c117c1523f 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -386,6 +386,8 @@ vlib_buffer_create_free_list_helper (vlib_main_t * vm,
clib_memset (f, 0, sizeof (f[0]));
f->index = f - vm->buffer_free_list_pool;
+ vec_validate (f->buffers, 0);
+ vec_reset_length (f->buffers);
f->n_data_bytes = vlib_buffer_round_size (n_data_bytes);
f->min_n_buffers_each_alloc = VLIB_FRAME_SIZE;
f->buffer_pool_index = 0;
@@ -412,6 +414,8 @@ vlib_buffer_create_free_list_helper (vlib_main_t * vm,
wf - wvm->buffer_free_list_pool);
wf[0] = f[0];
wf->buffers = 0;
+ vec_validate (wf->buffers, 0);
+ vec_reset_length (wf->buffers);
wf->n_alloc = 0;
}
diff --git a/src/vlib/threads.c b/src/vlib/threads.c
index fc2586c8967..3e184e3e1cd 100644
--- a/src/vlib/threads.c
+++ b/src/vlib/threads.c
@@ -882,6 +882,8 @@ start_workers (vlib_main_t * vm)
fl_clone[0] = fl_orig[0];
fl_clone->buffers = 0;
+ vec_validate(fl_clone->buffers, 0);
+ vec_reset_length(fl_clone->buffers);
fl_clone->n_alloc = 0;
}));
/* *INDENT-ON* */