vlib:init free list buffers vec
fixes a problem seen when dhcp proxy uses vlib_buffer_chain_linearize
function which tries to vlib_buffer_alloc zero buffers - which succeeds
if the buffers vector is initialized but otherwise crashes when trying to
update the _vec_len in vlib_buffer_alloc_from_free_list
solved by initializing the free_list buffers vec
Change-Id: I1186d7aac05e54864d72f3f144e1bef8064f8efa
Signed-off-by: Eyal Bari <ebari@cisco.com>
diff --git a/src/vlib/threads.c b/src/vlib/threads.c
index fc2586c..3e184e3 100644
--- a/src/vlib/threads.c
+++ b/src/vlib/threads.c
@@ -882,6 +882,8 @@
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* */