Merge branch 'bugfix/lwip_socket_leak_accept_enfile' into 'master'

lwip: Fix leak when accept() fails due to max socket limit

See merge request idf/esp-idf!2585
This commit is contained in:
Angus Gratton 2018-07-02 09:02:21 +08:00
commit 6d1995b9d2

View file

@ -139,7 +139,7 @@ netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_cal
static inline bool is_created_by_socket(struct netconn *conn)
{
#if LWIP_SOCKET
if (conn && (conn->socket != -1)) {
if (conn && (conn->socket >= 0)) {
return true;
}
#endif