ip: Replace Sematics for Interface IP addresses
[vpp.git] / src / plugins / gbp / gbp_endpoint_group.c
index 19c05f9..92bad37 100644 (file)
@@ -52,11 +52,14 @@ gbp_endpoint_group_get (index_t i)
 }
 
 void
-gbp_endpoint_group_lock (index_t i)
+gbp_endpoint_group_lock (index_t ggi)
 {
   gbp_endpoint_group_t *gg;
 
-  gg = gbp_endpoint_group_get (i);
+  if (INDEX_INVALID == ggi)
+    return;
+
+  gg = gbp_endpoint_group_get (ggi);
   gg->gg_locks++;
 }