mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-30 16:51:41 +00:00
Add missing call to knote_fdclose() in setugidsafety() and fdcloseexec().
Reviewed by: jlemon
This commit is contained in:
parent
f03bce74fc
commit
4a71feb71c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67808
@ -1007,6 +1007,8 @@ setugidsafety(p)
|
||||
if (*fpp != NULL && is_unsafe(*fpp)) {
|
||||
if ((*fdfp & UF_MAPPED) != 0)
|
||||
(void) munmapfd(p, i);
|
||||
if (i < fdp->fd_knlistsize)
|
||||
knote_fdclose(p, i);
|
||||
(void) closef(*fpp, p);
|
||||
*fpp = NULL;
|
||||
*fdfp = 0;
|
||||
@ -1040,6 +1042,8 @@ fdcloseexec(p)
|
||||
if (*fpp != NULL && (*fdfp & UF_EXCLOSE)) {
|
||||
if (*fdfp & UF_MAPPED)
|
||||
(void) munmapfd(p, i);
|
||||
if (i < fdp->fd_knlistsize)
|
||||
knote_fdclose(p, i);
|
||||
(void) closef(*fpp, p);
|
||||
*fpp = NULL;
|
||||
*fdfp = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user