svn commit: r297072 - head/sys/compat/linux
Dmitry Chagin
dchagin at FreeBSD.org
Sun Mar 20 19:06:23 UTC 2016
Author: dchagin
Date: Sun Mar 20 19:06:21 2016
New Revision: 297072
URL: https://svnweb.freebsd.org/changeset/base/297072
Log:
Check bsd_to_linux_statfs() return value. Forgotten in r297070.
MFC after: 1 week
Modified:
head/sys/compat/linux/linux_stats.c
Modified: head/sys/compat/linux/linux_stats.c
==============================================================================
--- head/sys/compat/linux/linux_stats.c Sun Mar 20 18:56:03 2016 (r297071)
+++ head/sys/compat/linux/linux_stats.c Sun Mar 20 19:06:21 2016 (r297072)
@@ -429,7 +429,9 @@ linux_statfs(struct thread *td, struct l
LFREEPATH(path);
if (error)
return (error);
- bsd_to_linux_statfs(&bsd_statfs, &linux_statfs);
+ error = bsd_to_linux_statfs(&bsd_statfs, &linux_statfs);
+ if (error)
+ return (error);
return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs)));
}
@@ -510,8 +512,10 @@ linux_fstatfs(struct thread *td, struct
#endif
error = kern_fstatfs(td, args->fd, &bsd_statfs);
if (error)
- return error;
- bsd_to_linux_statfs(&bsd_statfs, &linux_statfs);
+ return (error);
+ error = bsd_to_linux_statfs(&bsd_statfs, &linux_statfs);
+ if (error)
+ return (error);
return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs)));
}
More information about the svn-src-all
mailing list