Merge pull request #4466 from cgundogan/pr/posix_sockets/_implicit_bind

posix_sockets: do not use the address of best_match
This commit is contained in:
Oleg Hahm 2015-12-12 12:09:03 +01:00
commit ba08813211

View File

@ -198,13 +198,13 @@ static int _implicit_bind(socket_t *s, void *addr)
switch (s->type) {
#ifdef MODULE_CONN_TCP
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);
break;
#endif
#ifdef MODULE_CONN_UDP
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);
break;
#endif