Do not leak lro_hash on failure to allocate lro_mbuf_data.

MFC after:	1 week
This commit is contained in:
Navdeep Parhar 2017-04-19 22:27:26 +00:00
parent 5971d9cf1c
commit a3927369fa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=317172

View File

@ -144,6 +144,7 @@ tcp_lro_init_args(struct lro_ctrl *lc, struct ifnet *ifp,
/* check for out of memory */
if (lc->lro_mbuf_data == NULL) {
free(lc->lro_hash, M_LRO);
memset(lc, 0, sizeof(*lc));
return (ENOMEM);
}