Don't unlock a timewait structure if the pointer is NULL in
tcp_timewait(). This corrects a bug (or lack of fixing of a bug) in tcp_input.c:1.295. Submitted by: Kazuaki Oda <kaakun at highway dot ne dot jp> MFC after: 3 months
This commit is contained in:
parent
50ff9670e2
commit
a460ae4b4c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157534
@ -3272,7 +3272,8 @@ tcp_timewait(tw, to, th, m, tlen)
|
||||
return (0);
|
||||
|
||||
drop:
|
||||
INP_UNLOCK(tw->tw_inpcb);
|
||||
if (tw != NULL)
|
||||
INP_UNLOCK(tw->tw_inpcb);
|
||||
m_freem(m);
|
||||
return (0);
|
||||
}
|
||||
|
@ -3272,7 +3272,8 @@ tcp_timewait(tw, to, th, m, tlen)
|
||||
return (0);
|
||||
|
||||
drop:
|
||||
INP_UNLOCK(tw->tw_inpcb);
|
||||
if (tw != NULL)
|
||||
INP_UNLOCK(tw->tw_inpcb);
|
||||
m_freem(m);
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user