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

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);
}