X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/9bccf70c0258c7cac2dcb80011b2a964d884c552..55e303ae13a4cf49d70f2294092726f2fffb9ef2:/bsd/netinet6/raw_ip6.c diff --git a/bsd/netinet6/raw_ip6.c b/bsd/netinet6/raw_ip6.c index f49d75e92..97eca96dc 100644 --- a/bsd/netinet6/raw_ip6.c +++ b/bsd/netinet6/raw_ip6.c @@ -553,7 +553,9 @@ rip6_attach(struct socket *so, int proto, struct proc *p) inp->in6p_hops = -1; /* use kernel default */ inp->in6p_cksum = -1; MALLOC(inp->in6p_icmp6filt, struct icmp6_filter *, - sizeof(struct icmp6_filter), M_PCB, M_NOWAIT); + sizeof(struct icmp6_filter), M_PCB, M_WAITOK); + if (inp->in6p_icmp6filt == NULL) + return (ENOMEM); ICMP6_FILTER_SETPASSALL(inp->in6p_icmp6filt); return 0; }