Free lro_hash unconditionally, just like lro_mbuf_data a few lines

later.  Fix whitespace nit while here.
This commit is contained in:
Navdeep Parhar 2017-04-19 23:06:07 +00:00
parent 8152071324
commit b0ca71f0a0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=317177

View File

@ -175,17 +175,15 @@ tcp_lro_free(struct lro_ctrl *lc)
}
/* free hash table */
if (lc->lro_hash != NULL) {
free(lc->lro_hash, M_LRO);
lc->lro_hash = NULL;
}
free(lc->lro_hash, M_LRO);
lc->lro_hash = NULL;
lc->lro_hashsz = 0;
/* free mbuf array, if any */
for (x = 0; x != lc->lro_mbuf_count; x++)
m_freem(lc->lro_mbuf_data[x].mb);
lc->lro_mbuf_count = 0;
/* free allocated memory, if any */
free(lc->lro_mbuf_data, M_LRO);
lc->lro_mbuf_data = NULL;