summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in_pcb.c
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2000-03-22 02:27:30 +0000
committergreen <green@FreeBSD.org>2000-03-22 02:27:30 +0000
commit08e4f0700238abdec48bc342149c006d102636e5 (patch)
tree097af3db0391becae99a2ad4df9ca0212b7af1f0 /sys/netinet/in_pcb.c
parentc6413e4804e4a5a3c117398f0bfc6e9da49303e8 (diff)
downloadFreeBSD-src-08e4f0700238abdec48bc342149c006d102636e5.zip
FreeBSD-src-08e4f0700238abdec48bc342149c006d102636e5.tar.gz
in6_pcb.c:
Remove a bogus (redundant, just weird, etc.) key_freeso(so). There are no consumers of it now, nor does it seem there ever will be. in6?_pcb.c: Add an if (inp->in6?p_sp != NULL) before the call to ipsec[46]_delete_pcbpolicy(inp). In low-memory conditions this can cause a crash because in6?_sp can be NULL...
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r--sys/netinet/in_pcb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 2ac79ef..020987e 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -527,7 +527,8 @@ in_pcbdetach(inp)
struct inpcbinfo *ipi = inp->inp_pcbinfo;
#ifdef IPSEC
- ipsec4_delete_pcbpolicy(inp);
+ if (inp->inp_sp != NULL)
+ ipsec4_delete_pcbpolicy(inp);
#endif /*IPSEC*/
inp->inp_gencnt = ++ipi->ipi_gencnt;
in_pcbremlists(inp);
OpenPOWER on IntegriCloud