summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2000-10-28 20:27:32 +0000
committeralc <alc@FreeBSD.org>2000-10-28 20:27:32 +0000
commit8b68576c1658300e9ba6239ddab7cc0da01384ac (patch)
tree534e91ce5fd20b6d3940e8a3ccefe6a8be34afb8 /sys
parenta90e794625f844c7a6a29f8223943143bac3a03d (diff)
downloadFreeBSD-src-8b68576c1658300e9ba6239ddab7cc0da01384ac.zip
FreeBSD-src-8b68576c1658300e9ba6239ddab7cc0da01384ac.tar.gz
Add missing call to knote_fdclose() in setugidsafety() and fdcloseexec().
Reviewed by: jlemon
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_descrip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 6648917..5f2da95 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -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;
OpenPOWER on IntegriCloud