git: 9d0c9b6d6a6a - main - linux(4): Add a comment explaining udata freeing on error

From: Dmitry Chagin <dchagin_at_FreeBSD.org>
Date: Mon, 14 Aug 2023 12:47:20 UTC
The branch main has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=9d0c9b6d6a6a90f626088308dfb895221bf6d36f

commit 9d0c9b6d6a6a90f626088308dfb895221bf6d36f
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-08-14 12:46:12 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2023-08-14 12:46:12 +0000

    linux(4): Add a comment explaining udata freeing on error
    
    MFC after:      1 week
---
 sys/compat/linux/linux_socket.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 90a1cf879517..bd4b536e13d0 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -1876,6 +1876,7 @@ linux_recvmsg_common(struct thread *td, l_int s, struct l_msghdr *msghdr,
  			break;
  		}
 
+		/* The recvmsg_scm_ is responsible to free udata on error. */
 		if (error != 0)
 			goto bad;