aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2003-01-06 12:38:21 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2003-01-06 12:38:21 +0000
commit3eda35a774d262340e762766852d1d53cd9657a2 (patch)
tree7ec82cc953b539bed64f7899d890227d3eb2e471
parentbee2a5cc37dc7f1cf7e406ea49291153940d7e22 (diff)
downloadsrc-3eda35a774d262340e762766852d1d53cd9657a2.tar.gz
src-3eda35a774d262340e762766852d1d53cd9657a2.zip
MFC 1.114: Fix a file descriptor leak in fpathconf(2).
Notes
Notes: svn path=/releng/4.6/; revision=108789
-rw-r--r--UPDATING3
-rw-r--r--sys/conf/newvers.sh2
-rw-r--r--sys/kern/kern_descrip.c10
3 files changed, 10 insertions, 5 deletions
diff --git a/UPDATING b/UPDATING
index f76db5fac011..1975d6f14023 100644
--- a/UPDATING
+++ b/UPDATING
@@ -17,6 +17,9 @@ minimal number of processes, if possible, for that patch. For those
updates that don't have an advisory, or to be safe, you can do a full
build and install as described in the COMMON ITEMS section.
+20030106: p6 FreeBSD-SA-02:44.filedesc
+ Correct a reference counting bug in fpathconf(2).
+
20021113: p5 FreeBSD-SA-02:43.bind
Correct name server vulnerabilities.
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 3bd6a43fed63..b0890ecb98e4 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -36,7 +36,7 @@
TYPE="FreeBSD"
REVISION="4.6.2"
-BRANCH="RELEASE-p5"
+BRANCH="RELEASE-p6"
RELEASE="${REVISION}-${BRANCH}"
VERSION="${TYPE} ${RELEASE}"
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index c2db5a4cffe9..50888ce6820a 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -711,10 +711,12 @@ fpathconf(p, uap)
switch (fp->f_type) {
case DTYPE_PIPE:
case DTYPE_SOCKET:
- if (uap->name != _PC_PIPE_BUF)
- return (EINVAL);
- p->p_retval[0] = PIPE_BUF;
- error = 0;
+ if (uap->name != _PC_PIPE_BUF) {
+ error = EINVAL;
+ } else {
+ p->p_retval[0] = PIPE_BUF;
+ error = 0;
+ }
break;
case DTYPE_FIFO:
case DTYPE_VNODE: