svn commit: r355425 - head/sys/netinet6
Kristof Provost
kp at FreeBSD.org
Thu Dec 5 16:50:54 UTC 2019
Author: kp
Date: Thu Dec 5 16:50:54 2019
New Revision: 355425
URL: https://svnweb.freebsd.org/changeset/base/355425
Log:
Remove useless NULL check
Coverity points out that we've already dereferenced m by the time we check, so
there's no reason to keep the check. Moreover, it's safe to pass NULL to
m_freem() anyway.
CID: 1019092
Modified:
head/sys/netinet6/udp6_usrreq.c
Modified: head/sys/netinet6/udp6_usrreq.c
==============================================================================
--- head/sys/netinet6/udp6_usrreq.c Thu Dec 5 16:17:56 2019 (r355424)
+++ head/sys/netinet6/udp6_usrreq.c Thu Dec 5 16:50:54 2019 (r355425)
@@ -528,8 +528,7 @@ udp6_input(struct mbuf **mp, int *offp, int proto)
return (IPPROTO_DONE);
badunlocked:
- if (m)
- m_freem(m);
+ m_freem(m);
*mp = NULL;
return (IPPROTO_DONE);
}
More information about the svn-src-all
mailing list