summaryrefslogtreecommitdiffstats
path: root/src/vnet/srmpls/sr_mpls_policy.c
diff options
context:
space:
mode:
authorChris Luke <chrisy@flirble.org>2018-03-29 12:56:58 -0700
committerChris Luke <chrisy@flirble.org>2018-03-29 15:23:56 -0700
commit30684ac044bbb8e11ef100a24c01eb37ba7a8876 (patch)
treeac5d526793fbafed606355c22d8e627e66d95786 /src/vnet/srmpls/sr_mpls_policy.c
parentf3a3bad8006afb0b379761dfe4d5d25de07b32cc (diff)
Coverity fixes (VPP-1204)
Minor bug fixes CID 183000: double close CID 180996: dead code CID 180995: NULL deref CID 181957: NULL deref CID 182676: NULL deref CID 182675: NULL deref Change-Id: Id35e391c95fafb8cd771984ee8a1a6e597056d37 Signed-off-by: Chris Luke <chrisy@flirble.org>
Diffstat (limited to 'src/vnet/srmpls/sr_mpls_policy.c')
-rwxr-xr-xsrc/vnet/srmpls/sr_mpls_policy.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/srmpls/sr_mpls_policy.c b/src/vnet/srmpls/sr_mpls_policy.c
index 4a563248ce0..7d336c17594 100755
--- a/src/vnet/srmpls/sr_mpls_policy.c
+++ b/src/vnet/srmpls/sr_mpls_policy.c
@@ -661,6 +661,10 @@ sr_mpls_policy_assign_endpoint_color (mpls_label_t bsid,
old_value =
mhash_get ((mhash_t *) endpoint_table, &sr_policy->endpoint);
+ /* CID 180995 This should never be NULL unless the two hash tables
+ * get out of sync */
+ ASSERT (old_value != NULL);
+
fib_prefix_t pfx = { 0 };
pfx.fp_proto = FIB_PROTOCOL_MPLS;
pfx.fp_len = 21;