posix_sockets: do not use the address of best_match

This commit is contained in:
Cenk Gündoğan 2015-12-12 02:51:00 +01:00
parent f2e29aef7c
commit 6f92b056f9

View File

@ -198,13 +198,13 @@ static int _implicit_bind(socket_t *s, void *addr)
switch (s->type) { switch (s->type) {
#ifdef MODULE_CONN_TCP #ifdef MODULE_CONN_TCP
case SOCK_STREAM: case SOCK_STREAM:
res = conn_tcp_create(&s->conn.udp, &best_match, sizeof(unspec), res = conn_tcp_create(&s->conn.udp, best_match, sizeof(unspec),
s->domain, s->src_port); s->domain, s->src_port);
break; break;
#endif #endif
#ifdef MODULE_CONN_UDP #ifdef MODULE_CONN_UDP
case SOCK_DGRAM: case SOCK_DGRAM:
res = conn_udp_create(&s->conn.udp, &best_match, sizeof(unspec), res = conn_udp_create(&s->conn.udp, best_match, sizeof(unspec),
s->domain, s->src_port); s->domain, s->src_port);
break; break;
#endif #endif