Date: Sun, 20 Mar 2016 19:06:21 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297072 - head/sys/compat/linux Message-ID: <201603201906.u2KJ6LbO036635@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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))); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603201906.u2KJ6LbO036635>