Do soreserve() before `kp' allocation. This simplifies error path. The
authormvs <mvs@openbsd.org>
Sun, 2 May 2021 14:22:05 +0000 (14:22 +0000)
committermvs <mvs@openbsd.org>
Sun, 2 May 2021 14:22:05 +0000 (14:22 +0000)
commit891dfedc260602a4b08b493c26b4b2e8d6f72c1c
tree317f8b04c6c120ddd7cc411e4edc94fa92f2bcc5
parentc543bf3f327bbb85d2f9fc817ae3eeda1d008f0e
Do soreserve() before `kp' allocation. This simplifies error path. The
same was done for route_attach().

Also do soisconnected() after `kp' is fully initialized. This chair
movement affects nothing for PF_KEY sockets but makes code more
consistent.

ok bluhm@ mpi@
sys/net/pfkeyv2.c