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)
This commit is contained in:
Ermal Luçi 2015-07-09 16:28:36 +00:00
parent 7b7254e71f
commit 56844a6203

View File

@ -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.