Skip to content

Commit

Permalink
gnrc_sock_udp: fix possibly dereferenced NULL pointer (RIOT-OS#6203)
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 authored and kb2ma committed Jan 14, 2017
1 parent 9602988 commit f6d09ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/net/gnrc/sock/udp/gnrc_sock_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ ssize_t sock_udp_send(sock_udp_t *sock, const void *data, size_t len,
dst_port = remote->port;
}
if ((remote != NULL) && (remote->family == AF_UNSPEC) &&
(sock->remote.family != AF_UNSPEC)) {
(sock != NULL) && (sock->remote.family != AF_UNSPEC)) {
/* remote was set on create so take its family */
rem.family = sock->remote.family;
}
Expand Down

0 comments on commit f6d09ed

Please sign in to comment.