routed(8): Dereference before null check.

CID:		272432
Obtained from:	NetBSD (CVS ref. 1.16)
MFC after:	2 weeks.
This commit is contained in:
Pedro F. Giffuni 2016-05-15 02:41:20 +00:00
parent 7b011d21db
commit 65e2bd0ab8

View File

@ -758,7 +758,7 @@ send_rdisc(union ad_u *p,
if (rdisc_sock < 0)
get_rdisc_sock();
trace_rdisc(msg, ifp->int_addr, rsin.sin_addr.s_addr, ifp,
trace_rdisc(msg, (ifp ? ifp->int_addr : 0), rsin.sin_addr.s_addr, ifp,
p, p_size);
if (0 > sendto(rdisc_sock, p, p_size, flags,