MCPcopy Create free account
hub / github.com/F-Stack/f-stack / key_delsah

Function key_delsah

freebsd/netipsec/key.c:2875–2887  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2873}
2874
2875static void
2876key_delsah(struct secashead *sah)
2877{
2878 IPSEC_ASSERT(sah != NULL, ("NULL sah"));
2879 IPSEC_ASSERT(sah->state == SADB_SASTATE_DEAD,
2880 ("Attempt to free non DEAD SAH %p", sah));
2881 IPSEC_ASSERT(TAILQ_EMPTY(&sah->savtree_larval),
2882 ("Attempt to free SAH %p with LARVAL SA", sah));
2883 IPSEC_ASSERT(TAILQ_EMPTY(&sah->savtree_alive),
2884 ("Attempt to free SAH %p with ALIVE SA", sah));
2885
2886 free(sah, M_IPSEC_SAH);
2887}
2888
2889/*
2890 * allocating a new SA for key_add() and key_getspi() call,

Callers 1

key_freesahFunction · 0.85

Calls 1

freeFunction · 0.50

Tested by

no test coverage detected