cxgbe/t4_tom: toepcb should be all-zero on allocation because the code

that cleans up on failure assumes that non-NULL values indicate
initialized items.

Sponsored by:	Chelsio Communications
This commit is contained in:
Navdeep Parhar 2016-09-05 19:37:47 +00:00
parent dc3155c1be
commit 5aaa3bc3b9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305433

View File

@ -332,7 +332,7 @@ t4_connect(struct toedev *tod, struct socket *so, struct rtentry *rt,
else
DONT_OFFLOAD_ACTIVE_OPEN(ENOTSUP);
toep = alloc_toepcb(vi, -1, -1, M_NOWAIT);
toep = alloc_toepcb(vi, -1, -1, M_NOWAIT | M_ZERO);
if (toep == NULL)
DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM);