summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/udp_usrreq.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index f065f80..8c844e3 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -307,9 +307,6 @@ udp_append(struct inpcb *inp, struct ip *ip, struct mbuf *n, int off,
return;
}
- if (n == NULL)
- return;
-
off += sizeof(struct udphdr);
#ifdef IPSEC
@@ -568,8 +565,10 @@ udp_input(struct mbuf *m, int off)
if (last != NULL) {
struct mbuf *n;
- n = m_copy(m, 0, M_COPYALL);
- udp_append(last, ip, n, iphlen, &udp_in);
+ if ((n = m_copy(m, 0, M_COPYALL)) != NULL) {
+ udp_append(last, ip, n, iphlen,
+ &udp_in);
+ }
INP_RUNLOCK(last);
}
last = inp;
OpenPOWER on IntegriCloud