mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
linux(4): Use M_LINUX for malloc type in getdents64
MFC after: 2 weeks
This commit is contained in:
parent
b27f3237c8
commit
e27e3fa71c
1 changed files with 4 additions and 4 deletions
|
|
@ -489,7 +489,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);
|
||||
|
|
@ -498,7 +498,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];
|
||||
|
|
@ -541,9 +541,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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue