mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 22:20:01 +08:00
net/tcp: fix tcp conn lock leak when port in use in tcp_selectport
Fix tcp conn lock leak when port in use in tcp_selectport. Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
This commit is contained in:
committed by
Filipe do Ó Cavalcanti
parent
6addf24fa2
commit
11ea1de01d
@@ -535,6 +535,7 @@ int tcp_selectport(uint8_t domain,
|
||||
{
|
||||
/* We have looped back, failed. */
|
||||
|
||||
tcp_conn_list_unlock();
|
||||
return -EADDRINUSE;
|
||||
}
|
||||
}
|
||||
@@ -558,6 +559,7 @@ int tcp_selectport(uint8_t domain,
|
||||
{
|
||||
/* It is in use... return EADDRINUSE */
|
||||
|
||||
tcp_conn_list_unlock();
|
||||
return -EADDRINUSE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user