summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/net/if_wg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_wg.c b/sys/net/if_wg.c
index 3de52a588cb..807d08a7b6e 100644
--- a/sys/net/if_wg.c
+++ b/sys/net/if_wg.c
@@ -1965,9 +1965,9 @@ wg_index_drop(void *_sc, uint32_t key0)
}
mtx_leave(&sc->sc_index_mtx);
- /* We expect a peer */
+ /* We expect an index match */
+ KASSERT(iter != NULL);
peer = CONTAINER_OF(iter->i_value, struct wg_peer, p_remote);
- KASSERT(peer != NULL);
SLIST_INSERT_HEAD(&peer->p_unused_index, iter, i_unused_entry);
}