Do not delay freeing rtm. Bandaid added in r227061 is not needed since r227061,

MFC after:	1 month
This commit is contained in:
Alexander V. Chernikov 2014-04-27 09:49:35 +00:00
parent dc74dde71e
commit 2277c5e5e2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=265009

View File

@ -842,7 +842,7 @@ flush:
/* There is another listener, so construct message */
rp = sotorawcb(so);
}
if (rtm) {
if (rtm != NULL) {
#ifdef INET6
if (rti_need_deembed) {
/* sin6_scope_id is recovered before sending rtm. */
@ -865,6 +865,7 @@ flush:
m = NULL;
} else if (m->m_pkthdr.len > rtm->rtm_msglen)
m_adj(m, rtm->rtm_msglen - m->m_pkthdr.len);
Free(rtm);
}
if (m) {
M_SETFIB(m, fibnum);
@ -881,9 +882,6 @@ flush:
} else
rt_dispatch(m, saf);
}
/* info.rti_info[RTAX_DST] (used above) can point inside of rtm */
if (rtm)
Free(rtm);
}
return (error);
}