git: 6335583990d8 - main - linux(4): For future use replace malloc type for l_sockaddr by M_LINUX
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 28 May 2022 20:53:22 UTC
The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=6335583990d8691ab01cd4fa92390f82f07e3d75 commit 6335583990d8691ab01cd4fa92390f82f07e3d75 Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2022-05-28 20:44:48 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2022-05-28 20:44:48 +0000 linux(4): For future use replace malloc type for l_sockaddr by M_LINUX MFC after: 2 weeks --- 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 2de5d9ca1911..f29fc2b6743a 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); }