mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Add back a fdrop() call at the end of kern_open() that got lost in
revision 1.218. This bug caused a "struct file" reference to be leaked if VOP_ADVLOCK(), vn_start_write(), or mac_check_vnode_write() failed during the open operation. PR: kern/43739 Reported by: Arne Woerner <woerner@mediabase-gmbh.de>
This commit is contained in:
parent
f96d19da13
commit
197b023b1b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104631
@ -773,6 +773,7 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags,
|
|||||||
fdrop(fp, td);
|
fdrop(fp, td);
|
||||||
} else
|
} else
|
||||||
FILEDESC_UNLOCK(fdp);
|
FILEDESC_UNLOCK(fdp);
|
||||||
|
fdrop(fp, td);
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -773,6 +773,7 @@ kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags,
|
|||||||
fdrop(fp, td);
|
fdrop(fp, td);
|
||||||
} else
|
} else
|
||||||
FILEDESC_UNLOCK(fdp);
|
FILEDESC_UNLOCK(fdp);
|
||||||
|
fdrop(fp, td);
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user