diff options
author | kris <kris@FreeBSD.org> | 2008-04-26 13:16:55 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2008-04-26 13:16:55 +0000 |
commit | 150f1de0cf1e2342ec39b72b7c3969d252db3032 (patch) | |
tree | 0731bf0f7a276da110b4483cc009b4ed60697926 | |
parent | cb7610bd5214be1b0977bd2b83d8e95686c8881b (diff) | |
download | FreeBSD-src-150f1de0cf1e2342ec39b72b7c3969d252db3032.zip FreeBSD-src-150f1de0cf1e2342ec39b72b7c3969d252db3032.tar.gz |
* Correct a mis-merge that leaked the PROC_LOCK [1]
* Return ENOENT on error instead of 0 [2]
Submitted by: rdivacky [1], kib [2]
-rw-r--r-- | sys/kern/kern_descrip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 34b7cf0..bdc6d78 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2583,9 +2583,9 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER_ARGS) return (error); } fdp = fdhold(p); - if (fdp == NULL) - return (0); PROC_UNLOCK(p); + if (fdp == NULL) + return (ENOENT); kif = malloc(sizeof(*kif), M_TEMP, M_WAITOK); FILEDESC_SLOCK(fdp); if (fdp->fd_cdir != NULL) |