diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2008-01-05 12:36:35 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2008-01-05 12:36:35 +0000 |
| commit | d075105da01d0a8f40bdef0433b29f5efb9eaefe (patch) | |
| tree | 65c4ca811e0b1e2a19576f3676a477ed76906ba0 | |
| parent | 9283848511fcb2187a7a979bee0e406f7bd02b59 (diff) | |
Notes
| -rw-r--r-- | sys/compat/linux/linux_stats.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 048a401dbb5b..374ce39a0eb3 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -270,13 +270,15 @@ linux_stat(struct thread *td, struct linux_stat_args *args) #ifdef DEBUG if (ldebug(stat)) - printf(ARGS(stat, "%s, *"), args->path); + printf(ARGS(stat, "%s, *"), path); #endif error = kern_stat(td, path, UIO_SYSSPACE, &buf); - LFREEPATH(path); - if (error) + if (error) { + LFREEPATH(path); return (error); - translate_path_major_minor(td, args->path, &buf); + } + translate_path_major_minor(td, path, &buf); + LFREEPATH(path); return(stat_copyout(&buf, args->up)); } @@ -291,13 +293,15 @@ linux_lstat(struct thread *td, struct linux_lstat_args *args) #ifdef DEBUG if (ldebug(lstat)) - printf(ARGS(lstat, "%s, *"), args->path); + printf(ARGS(lstat, "%s, *"), path); #endif - error = kern_lstat(td, args->path, UIO_SYSSPACE, &buf); - LFREEPATH(path); - if (error) + error = kern_lstat(td, path, UIO_SYSSPACE, &buf); + if (error) { + LFREEPATH(path); return (error); - translate_path_major_minor(td, args->path, &buf); + } + translate_path_major_minor(td, path, &buf); + LFREEPATH(path); return(stat_copyout(&buf, args->up)); } |
