The error paths of ah_input_cb(), ah_output_cb(), ipcomp_input_cb() and
ipcomp_output_cb() called CURVNET_RESTORE() before key_freesav() and
key_freesp(). When the callback runs on a crypto return thread, no
vnet is set after the restore, and key_freesav() panics with "vnet is
not set" on INVARIANTS kernels. Without INVARIANTS, the last reference
would be released without a vnet.
Restore the vnet last, as the ESP callbacks do.
Fixes: 8a9269edd71a ("ipsec: sprinkle CURVNET_ASSERT_SET")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")