diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2007-12-31 03:44:54 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2007-12-31 03:44:54 +0000 |
| commit | 6f552cb0988a631e79c8f96cfc4fe8f7edc6ac4f (patch) | |
| tree | 8984eb828e6be88cf8850103c437e62460058be1 | |
| parent | c24c4645447a70ff852a235a69db9b8fbabaaabc (diff) | |
Notes
| -rw-r--r-- | sys/kern/uipc_usrreq.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 1d6cc464da0f..2f2b763b025c 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1916,8 +1916,7 @@ unp_accessable(struct file *fp) { struct unpcb *unp; - unp = fptounp(fp); - if (fp == NULL) + if ((unp = fptounp(fp)) == NULL) return; if (unp->unp_gcflag & UNPGC_REF) return; @@ -1942,8 +1941,7 @@ unp_gc_process(struct unpcb *unp) * queue as indicated by msgcount, and this must equal the file * reference count. Note that when msgcount is 0 the file is NULL. */ - if (unp->unp_msgcount != 0 && fp->f_count != 0 && - fp->f_count == unp->unp_msgcount) { + if (fp && fp->f_count != 0 && fp->f_count == unp->unp_msgcount) { unp->unp_gcflag |= UNPGC_DEAD; unp_unreachable++; return; |
