From f5eca4c95705929d25f9548a80b5041730c2186f Mon Sep 17 00:00:00 2001 From: dchagin Date: Sun, 24 May 2015 16:14:41 +0000 Subject: Where possible we will use M_LINUX malloc(9) type. Move M_FUTEX defines to the linux_common.ko. Differential Revision: https://reviews.freebsd.org/D1077 Reviewed by: emaste --- sys/compat/linux/linux_sysctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/compat/linux/linux_sysctl.c') diff --git a/sys/compat/linux/linux_sysctl.c b/sys/compat/linux/linux_sysctl.c index 7d263df..44fe41d 100644 --- a/sys/compat/linux/linux_sysctl.c +++ b/sys/compat/linux/linux_sysctl.c @@ -140,12 +140,12 @@ linux_sysctl(struct thread *td, struct linux_sysctl_args *args) return (ENOTDIR); } - mib = malloc(la.nlen * sizeof(l_int), M_TEMP, M_WAITOK); + mib = malloc(la.nlen * sizeof(l_int), M_LINUX, M_WAITOK); error = copyin(PTRIN(la.name), mib, la.nlen * sizeof(l_int)); if (error) { LIN_SDT_PROBE1(sysctl, linux_sysctl, copyin_error, error); LIN_SDT_PROBE1(sysctl, linux_sysctl, return, error); - free(mib, M_TEMP); + free(mib, M_LINUX); return (error); } @@ -157,7 +157,7 @@ linux_sysctl(struct thread *td, struct linux_sysctl_args *args) switch (mib[1]) { case LINUX_KERN_VERSION: error = handle_string(&la, version); - free(mib, M_TEMP); + free(mib, M_LINUX); LIN_SDT_PROBE1(sysctl, linux_sysctl, return, error); return (error); default: @@ -186,7 +186,7 @@ linux_sysctl(struct thread *td, struct linux_sysctl_args *args) sbuf_delete(sb); } - free(mib, M_TEMP); + free(mib, M_LINUX); LIN_SDT_PROBE1(sysctl, linux_sysctl, return, ENOTDIR); return (ENOTDIR); -- cgit v1.1