1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

posix_sockets: fix overflowing fd in close()

This commit is contained in:
Cenk Gündoğan 2015-12-12 04:11:48 +01:00
parent f2e29aef7c
commit 63813acb7e
2 changed files with 2 additions and 0 deletions

View File

@ -56,6 +56,7 @@ void conn_udp_close(conn_udp_t *conn)
assert(conn->l4_type == GNRC_NETTYPE_UDP);
if (conn->netreg_entry.pid != KERNEL_PID_UNDEF) {
gnrc_netreg_unregister(GNRC_NETTYPE_UDP, &conn->netreg_entry);
conn->netreg_entry.pid = KERNEL_PID_UNDEF;
}
}

View File

@ -255,6 +255,7 @@ static int socket_close(int socket)
res = -1;
break;
}
break;
default:
res = -1;
break;