Add missing call to knote_fdclose() in setugidsafety() and fdcloseexec().

Reviewed by:	jlemon
This commit is contained in:
alc 2000-10-28 20:27:32 +00:00
parent 913cc9d6c8
commit d40f5292c7

View File

@ -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;