1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

Only return (tw) from tcp_twclose() if reuse is passed, otherwise

return NULL.  In principle this shouldn't change the behavior, but
avoids returning a potentially invalid/inappropriate pointer to
the caller.

Found with:	Coverity Prevent (tm)
Submitted by:	pjd
MFC after:	3 months
This commit is contained in:
Robert Watson 2006-05-05 06:50:23 +00:00
parent dee1a56be0
commit 3127286870
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=158304

View File

@ -295,7 +295,7 @@ tcp_timer_2msl_tw(int reuse)
continue;
INP_LOCK(tw->tw_inpcb);
tcp_twclose(tw, reuse);
return (tw);
return (reuse ? tw : NULL);
}
return (NULL);
}