Using a void pointer for temporary allocated TDB in pfkeyv2 does
authorbluhm <bluhm@openbsd.org>
Mon, 29 Nov 2021 15:39:59 +0000 (15:39 +0000)
committerbluhm <bluhm@openbsd.org>
Mon, 29 Nov 2021 15:39:59 +0000 (15:39 +0000)
commit08d984e5bf9ac9ac33e6662fba04b2fc0680b237
tree7e0f30da61c7bd87b65afc2e6a51a5b6be5687f3
parent112e2fea8220aef9c65a0cc5f35fd7f9dd4967c1
Using a void pointer for temporary allocated TDB in pfkeyv2 does
not make sense.  Do not use the freeme pointer for TDB in pfkeyv2_send().
The pattern is tdb_alloc() and tdb_unref() in case of error.  Replace
tdb_free() in reserve_spi() with tdb_unref() to keep this consistent.
Only tdb_unref() should call tdb_free().
OK mvs@
sys/net/pfkeyv2.c
sys/netinet/ip_ipsp.c