This can happen in the case of pretty much any failure in wg_peer_add(),
we end up underflowing sc_peers_num and doing bad things with the tailq
because peers are only accounted for and added at the very end of
wg_peer_add().
Just add a parameter to wg_peer_destroy() to indicate whether the peer
was actually linked in or not, so that we can avoid botching the
accounting. The other parts of wg_peer_destroy() are still generally
applicable.
This path is somewhat hard to exercise since wg(8) does validation of
most things that can cause a failure, so no test is added. The easiest
reproducer is to build a kernel with INET removed and configure a peer
with an IPv4 allowed-ip.