diff options
author | nectar <nectar@FreeBSD.org> | 2003-01-06 13:19:05 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2003-01-06 13:19:05 +0000 |
commit | 266526442d75736b6f9ba0af867862398750359a (patch) | |
tree | 964e733fa29037843c054f928b2b37538b1d7fe6 /sys/kern/kern_descrip.c | |
parent | a7aae2379c9310619baaa6ab29d726e8225034e2 (diff) | |
download | FreeBSD-src-266526442d75736b6f9ba0af867862398750359a.zip FreeBSD-src-266526442d75736b6f9ba0af867862398750359a.tar.gz |
Correct file descriptor leaks in lseek and do_dup.
The leak in lseek was introduced in vfs_syscalls.c revision 1.218.
The leak in do_dup was introduced in kern_descrip.c revision 1.158.
Submitted by: iedowse
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r-- | sys/kern/kern_descrip.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index bc14c61..e5a2114 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -483,6 +483,7 @@ do_dup(td, type, old, new, retval) error = fdalloc(td, new, &newfd); if (error) { FILEDESC_UNLOCK(fdp); + fdrop(fp, td); return (error); } } |