diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 4182d1c5c10f..12db1a0dd5ab 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -1165,7 +1165,7 @@ linux_recvmsg_common(struct thread *td, l_int s, struct l_msghdr *msghdr, if (error != 0) goto bad; - if (sa) { + if (msg->msg_name) { msg->msg_name = PTRIN(linux_msg.msg_name); error = bsd_to_linux_sockaddr(sa, &lsa, msg->msg_namelen); if (error == 0)