svn commit: r285325 - head/sys/netinet
Ermal Luçi
eri at FreeBSD.org
Thu Jul 9 16:28:37 UTC 2015
Author: eri
Date: Thu Jul 9 16:28:36 2015
New Revision: 285325
URL: https://svnweb.freebsd.org/changeset/base/285325
Log:
Correct issue presented in r285051,
apparently neither clang nor gcc complain about this.
But clang intis the var to NULL correctly while gcc on at least mips does not.
Correct the undefined behavior by initializing the variable properly.
PR: 201371
Differential Revision: https://reviews.freebsd.org/D3036
Reviewed by: gnn
Approved by: gnn(mentor)
Modified:
head/sys/netinet/ip_input.c
Modified: head/sys/netinet/ip_input.c
==============================================================================
--- head/sys/netinet/ip_input.c Thu Jul 9 16:13:05 2015 (r285324)
+++ head/sys/netinet/ip_input.c Thu Jul 9 16:28:36 2015 (r285325)
@@ -941,7 +941,8 @@ ip_forward(struct mbuf *m, int srcrt)
if (ro.ro_rt != NULL) {
ia = ifatoia(ro.ro_rt->rt_ifa);
ifa_ref(&ia->ia_ifa);
- }
+ } else
+ ia = NULL;
#ifndef IPSEC
/*
* 'ia' may be NULL if there is no route for this destination.
More information about the svn-src-all
mailing list