When clearing rtmsg, pass &rtmsg to bzero() instead of the address of

just the header

Reported by:	Coverity
CID:		1007568, 1194256
MFC after:	1 week
This commit is contained in:
Don Lewis 2016-05-17 04:03:45 +00:00
parent 54d9f34ea3
commit 78db15ccf7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300002

View File

@ -739,7 +739,7 @@ update_arptab(u_char *ep, in_addr_t ipaddr)
/* Get the type and interface index */
rt = &rtmsg.rthdr;
bzero(rt, sizeof(rtmsg));
bzero(&rtmsg, sizeof(rtmsg));
rt->rtm_version = RTM_VERSION;
rt->rtm_addrs = RTA_DST;
rt->rtm_type = RTM_GET;