diff --git a/net/tcp/tcp_conn.c b/net/tcp/tcp_conn.c index 0fadc202d02..7ed6e34494e 100644 --- a/net/tcp/tcp_conn.c +++ b/net/tcp/tcp_conn.c @@ -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; } }