From 57cb29a73eb05208c26f8a7307550297f741c8d8 Mon Sep 17 00:00:00 2001 From: Dmitry Chagin Date: Tue, 21 May 2019 18:05:57 +0000 Subject: [PATCH] Do not use uninitialised sa. Reported by: tijl@ MFC after: 1 week --- sys/compat/linux/linux_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)