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

Function ipsec_delete_pcbpolicy

freebsd/netipsec/ipsec_pcb.c:168–184  ·  view source on GitHub ↗

Delete PCB policy. */

Source from the content-addressed store, hash-verified

166
167/* Delete PCB policy. */
168int
169ipsec_delete_pcbpolicy(struct inpcb *inp)
170{
171
172 if (inp->inp_sp == NULL)
173 return (0);
174
175 if (inp->inp_sp->sp_in != NULL)
176 key_freesp(&inp->inp_sp->sp_in);
177
178 if (inp->inp_sp->sp_out != NULL)
179 key_freesp(&inp->inp_sp->sp_out);
180
181 free(inp->inp_sp, M_IPSEC_INPCB);
182 inp->inp_sp = NULL;
183 return (0);
184}
185
186/* Deep-copy a policy in PCB. */
187static struct secpolicy *

Callers 1

in_pcbfree_deferredFunction · 0.85

Calls 2

key_freespFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected