Date: Thu, 5 Dec 2019 16:50:54 +0000 (UTC) From: Kristof Provost <kp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355425 - head/sys/netinet6 Message-ID: <201912051650.xB5Gosuf098422@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912051650.xB5Gosuf098422>