Do not assume that ip6_moptions is always set, it is

a lazy-allocated structure.
This commit is contained in:
Bruce M Simpson 2009-04-29 10:13:22 +00:00
parent 31a3e65dc2
commit 1096332a4a

View File

@ -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)