From e5d23883bf600bcfcd969dcbf422d7aec7fc52a0 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Sat, 21 Nov 2015 16:46:59 +0000 Subject: [PATCH] Revert part of r291137 which seems correct, bit does not fix the resource problem I'm currently hunting down. MFC after: 1 week X-MFC with: 291137 --- sys/netinet/sctp_pcb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index c681440d929..92a84d6a299 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -3640,11 +3640,13 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from) * macro here since le_next will get freed as part of the * sctp_free_assoc() call. */ + if (so) { #ifdef IPSEC - if (ip_pcb->inp_sp != NULL) { ipsec_delete_pcbpolicy(ip_pcb); +#endif /* IPSEC */ + + /* Unlocks not needed since the socket is gone now */ } -#endif if (ip_pcb->inp_options) { (void)sctp_m_free(ip_pcb->inp_options); ip_pcb->inp_options = 0;