aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/util')
-rw-r--r--src/vnet/util/trajectory.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vnet/util/trajectory.c b/src/vnet/util/trajectory.c
index 24b51254ecd..91812dcba58 100644
--- a/src/vnet/util/trajectory.c
+++ b/src/vnet/util/trajectory.c
@@ -64,7 +64,11 @@ vnet_dump_trajectory_trace (vlib_main_t * vm, u32 bi)
void
init_trajectory_trace (vlib_buffer_t * b)
{
- vec_validate (vnet_buffer2 (b)->trajectory_trace, 7);
+ if (!clib_mem_is_vec (vnet_buffer2 (b)->trajectory_trace))
+ {
+ vnet_buffer2 (b)->trajectory_trace = 0;
+ vec_validate (vnet_buffer2 (b)->trajectory_trace, 7);
+ }
_vec_len (vnet_buffer2 (b)->trajectory_trace) = 0;
}