Lines Matching refs:oldsp
2038 struct secpolicy *newsp, *oldsp; in key_spdadd() local
2116 oldsp = key_getsp(&spidx); in key_spdadd()
2117 if (oldsp != NULL) { in key_spdadd()
2121 __func__, oldsp)); in key_spdadd()
2122 KEYDBG(KEY_DATA, kdebug_secpolicy(oldsp)); in key_spdadd()
2124 key_freesp(&oldsp); in key_spdadd()
2133 if (oldsp != NULL) { in key_spdadd()
2134 key_unlink(oldsp); in key_spdadd()
2135 key_freesp(&oldsp); /* second for our reference */ in key_spdadd()
2168 if (oldsp != NULL) in key_spdadd()
2169 key_detach(oldsp); in key_spdadd()
2171 if (oldsp != NULL) { in key_spdadd()
2173 key_freesp(&oldsp); /* first for key_detach */ in key_spdadd()
2174 IPSEC_ASSERT(oldsp != NULL, ("null oldsp: refcount bug")); in key_spdadd()
2175 key_freesp(&oldsp); /* second for our reference */ in key_spdadd()
2182 if (oldsp != NULL) in key_spdadd()
2183 key_detach(oldsp); in key_spdadd()
2186 if (oldsp != NULL) { in key_spdadd()
2188 key_freesp(&oldsp); /* first for key_detach */ in key_spdadd()
2189 IPSEC_ASSERT(oldsp != NULL, ("null oldsp: refcount bug")); in key_spdadd()
2190 key_freesp(&oldsp); /* second for our reference */ in key_spdadd()