diff options
author | Dmitry Chagin <dchagin@FreeBSD.org> | 2023-07-18 21:44:16 +0000 |
---|---|---|
committer | Dmitry Chagin <dchagin@FreeBSD.org> | 2023-08-07 14:22:59 +0000 |
commit | b4ebdfe9980f00353ca91bad1acdf7e0bf80f47c (patch) | |
tree | 04595a8393947179bc3a15e18454717b2626e717 | |
parent | d41dfdb6f413ab3acba2897c7c992fbbd271382e (diff) | |
download | src-b4ebdfe9980f00353ca91bad1acdf7e0bf80f47c.tar.gz src-b4ebdfe9980f00353ca91bad1acdf7e0bf80f47c.zip |
linux(4): Use M_LINUX for malloc type in getdents64
MFC after: 2 weeks
(cherry picked from commit e27e3fa71c8f31304efa5e065876a34ee603a388)
-rw-r--r-- | sys/compat/linux/linux_file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index da492ec4c4cb..573c4c8a2eae 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -532,7 +532,7 @@ linux_getdents64(struct thread *td, struct linux_getdents64_args *args) size_t retval; buflen = min(args->count, MAXBSIZE); - buf = malloc(buflen, M_TEMP, M_WAITOK); + buf = malloc(buflen, M_LINUX, M_WAITOK); error = kern_getdirentries(td, args->fd, buf, buflen, &base, NULL, UIO_SYSSPACE); @@ -541,7 +541,7 @@ linux_getdents64(struct thread *td, struct linux_getdents64_args *args) goto out1; } - linux_dirent64 = malloc(LINUX_RECLEN64(LINUX_NAME_MAX), M_TEMP, + linux_dirent64 = malloc(LINUX_RECLEN64(LINUX_NAME_MAX), M_LINUX, M_WAITOK | M_ZERO); len = td->td_retval[0]; @@ -584,9 +584,9 @@ linux_getdents64(struct thread *td, struct linux_getdents64_args *args) td->td_retval[0] = retval; out: - free(linux_dirent64, M_TEMP); + free(linux_dirent64, M_LINUX); out1: - free(buf, M_TEMP); + free(buf, M_LINUX); return (error); } |