summaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_fdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linux/linux_fdio.c')
-rw-r--r--sys/compat/linux/linux_fdio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_fdio.c b/sys/compat/linux/linux_fdio.c
index 9363f9583be..cb711c9e13e 100644
--- a/sys/compat/linux/linux_fdio.c
+++ b/sys/compat/linux/linux_fdio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_fdio.c,v 1.4 2002/02/08 00:03:46 art Exp $ */
+/* $OpenBSD: linux_fdio.c,v 1.5 2002/02/13 19:08:06 art Exp $ */
/* $NetBSD: linux_fdio.c,v 1.1 2000/12/10 14:12:16 fvdl Exp $ */
/*
@@ -78,6 +78,7 @@ linux_ioctl_fdio(struct proc *p, struct linux_sys_ioctl_args *uap,
if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
return (EBADF);
+ FREF(fp);
com = SCARG(uap, com);
ioctlf = fp->f_ops->fo_ioctl;
@@ -144,5 +145,6 @@ linux_ioctl_fdio(struct proc *p, struct linux_sys_ioctl_args *uap,
error = EINVAL;
}
+ FRELE(fp);
return 0;
}