From b15bb282a592da78223c1e5da100e5612ee98353 Mon Sep 17 00:00:00 2001 From: mjg Date: Tue, 18 Aug 2020 22:03:55 +0000 Subject: [PATCH] linux: consistently use LFREEPATH instead of open-coding it --- sys/amd64/linux/linux_machdep.c | 2 +- sys/arm64/linux/linux_machdep.c | 2 +- sys/i386/linux/linux_machdep.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c index 654fefa0200..85ec7086bea 100644 --- a/sys/amd64/linux/linux_machdep.c +++ b/sys/amd64/linux/linux_machdep.c @@ -104,7 +104,7 @@ linux_execve(struct thread *td, struct linux_execve_args *args) error = exec_copyin_args(&eargs, path, UIO_SYSSPACE, args->argp, args->envp); - free(path, M_TEMP); + LFREEPATH(path); if (error == 0) error = linux_common_execve(td, &eargs); return (error); diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c index 058cbe965b1..6a7f1a5badd 100644 --- a/sys/arm64/linux/linux_machdep.c +++ b/sys/arm64/linux/linux_machdep.c @@ -71,7 +71,7 @@ linux_execve(struct thread *td, struct linux_execve_args *uap) error = exec_copyin_args(&eargs, path, UIO_SYSSPACE, uap->argp, uap->envp); - free(path, M_TEMP); + LFREEPATH(path); if (error == 0) error = linux_common_execve(td, &eargs); return (error); diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index ba106d554ee..677a70f1e1e 100644 --- a/sys/i386/linux/linux_machdep.c +++ b/sys/i386/linux/linux_machdep.c @@ -108,7 +108,7 @@ linux_execve(struct thread *td, struct linux_execve_args *args) error = exec_copyin_args(&eargs, newpath, UIO_SYSSPACE, args->argp, args->envp); - free(newpath, M_TEMP); + LFREEPATH(newpath); if (error == 0) error = linux_common_execve(td, &eargs); return (error); -- 2.45.0