git: 4c5b420b6582 - stable/13 - linux(4): For future use replace malloc type for l_sockaddr by M_LINUX

From: Dmitry Chagin <dchagin_at_FreeBSD.org>
Date: Fri, 17 Jun 2022 19:41:13 UTC
The branch stable/13 has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=4c5b420b6582835dd75fb01945d33307404a9d8d

commit 4c5b420b6582835dd75fb01945d33307404a9d8d
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2022-05-28 20:44:48 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2022-06-17 19:35:34 +0000

    linux(4): For future use replace malloc type for l_sockaddr by M_LINUX
    
    MFC after:              2 weeks
    
    (cherry picked from commit 6335583990d8691ab01cd4fa92390f82f07e3d75)
---
 sys/compat/linux/linux.c        | 2 +-
 sys/compat/linux/linux_socket.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c
index 414edc2446bd..7d16edf88b67 100644
--- a/sys/compat/linux/linux.c
+++ b/sys/compat/linux/linux.c
@@ -409,7 +409,7 @@ bsd_to_linux_sockaddr(const struct sockaddr *sa, struct l_sockaddr **lsa,
 	if (bdom == -1)
 		return (EAFNOSUPPORT);
 
-	kosa = malloc(len, M_SONAME, M_WAITOK);
+	kosa = malloc(len, M_LINUX, M_WAITOK);
 	bcopy(sa, kosa, len);
 	kosa->sa_family = bdom;
 	*lsa = kosa;
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 4dee89d1ebd6..56355f4f6ddb 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -731,7 +731,7 @@ linux_copyout_sockaddr(const struct sockaddr *sa, void *uaddr, size_t len)
 		return (error);
 
 	error = copyout(lsa, uaddr, len);
-	free(lsa, M_SONAME);
+	free(lsa, M_LINUX);
 
 	return (error);
 }