session: session disable crash if not enable
If session is not enable, type in the CLI session disable cause VPP to crash.
Type: fix
Change-Id: Ib55b7430b7ce521a40025d58fa18b765f5129fd5
Signed-off-by: Steven Luong <sluong@cisco.com>
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 2ca867c..5897693 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1869,7 +1869,8 @@
}
else
{
- vec_del1 (smm->update_time_fns, fi_pos);
+ if (found)
+ vec_del1 (smm->update_time_fns, fi_pos);
}
}