lisp: coverity fixes 99/31299/2
authorFlorin Coras <fcoras@cisco.com>
Mon, 15 Feb 2021 20:51:06 +0000 (12:51 -0800)
committerFlorin Coras <florin.coras@gmail.com>
Mon, 15 Feb 2021 20:46:17 +0000 (20:46 +0000)
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I2a55a2fe0c483359c3b42ebe93cd0e8e279131d1

src/plugins/lisp/lisp-cp/control.c

index 695d6ff..7293e03 100644 (file)
@@ -1132,9 +1132,6 @@ remove_mapping_if_needed (u32 mi, void *arg)
   locator_set_t *ls;
 
   m = pool_elt_at_index (lcm->mapping_pool, mi);
-  if (!m)
-    return;
-
   ls = pool_elt_at_index (lcm->locator_set_pool, m->locator_set_index);
 
   if (a->is_negative)
@@ -4172,9 +4169,6 @@ send_map_reply (lisp_cp_main_t * lcm, u32 mi, ip_address_t * dst,
   mapping_t *records = 0, *m;
 
   m = pool_elt_at_index (lcm->mapping_pool, mi);
-  if (!m)
-    return -1;
-
   vec_add1 (records, m[0]);
   add_locators (lcm, &records[0], m->locator_set_index, probed_loc);
   clib_memset (&src, 0, sizeof (src));