diff options
author | bms <bms@FreeBSD.org> | 2009-04-29 10:13:22 +0000 |
---|---|---|
committer | bms <bms@FreeBSD.org> | 2009-04-29 10:13:22 +0000 |
commit | 6ffa3bc944ee74ccd60df5c760c2cc549dafc3da (patch) | |
tree | 9a06603102735f490ddda5ea29d37e9bc09ba34f /sys/netinet/in_pcb.c | |
parent | ba39c52304a276c54e90a7c3b3822e0a6b4de606 (diff) | |
download | FreeBSD-src-6ffa3bc944ee74ccd60df5c760c2cc549dafc3da.zip FreeBSD-src-6ffa3bc944ee74ccd60df5c760c2cc549dafc3da.tar.gz |
Do not assume that ip6_moptions is always set, it is
a lazy-allocated structure.
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r-- | sys/netinet/in_pcb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 2c0071b..9ff531a 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -927,7 +927,8 @@ in_pcbfree_internal(struct inpcb *inp) #ifdef INET6 if (inp->inp_vflag & INP_IPV6PROTO) { ip6_freepcbopts(inp->in6p_outputopts); - ip6_freemoptions(inp->in6p_moptions); + if (inp->in6p_moptions != NULL) + ip6_freemoptions(inp->in6p_moptions); } #endif if (inp->inp_options) |