summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_descrip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index a0daf53..a659aee8 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -541,9 +541,10 @@ ofstat(p, uap)
(fp = fdp->fd_ofiles[uap->fd]) == NULL)
return (EBADF);
error = fo_stat(fp, &ub, p);
- cvtstat(&ub, &oub);
- if (error == 0)
+ if (error == 0) {
+ cvtstat(&ub, &oub);
error = copyout((caddr_t)&oub, (caddr_t)uap->sb, sizeof (oub));
+ }
return (error);
}
#endif /* COMPAT_43 || COMPAT_SUNOS */
OpenPOWER on IntegriCloud