summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>1999-05-30 01:12:19 +0000
committeralc <alc@FreeBSD.org>1999-05-30 01:12:19 +0000
commita20319a2aece106c114f5acaf91f641f42bdabec (patch)
treed0e7d742e13c86d026b4b0bd266157653f8b558f /sys/vm/vm_object.c
parent58ba6a68efa86520104001a99ce34ef2d3e62049 (diff)
downloadFreeBSD-src-a20319a2aece106c114f5acaf91f641f42bdabec.zip
FreeBSD-src-a20319a2aece106c114f5acaf91f641f42bdabec.tar.gz
Addendum to 1.155. Verify the existence of the object before checking
its reference count.
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r--sys/vm/vm_object.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 0dccdf1..010ea28 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_object.c,v 1.154 1999/05/16 05:07:34 alc Exp $
+ * $Id: vm_object.c,v 1.155 1999/05/28 03:39:44 alc Exp $
*/
/*
@@ -871,7 +871,8 @@ vm_object_shadow(object, offset, length)
* Don't create the new object if the old object isn't shared.
*/
- if (source->ref_count == 1 &&
+ if (source != NULL &&
+ source->ref_count == 1 &&
source->handle == NULL &&
(source->type == OBJT_DEFAULT ||
source->type == OBJT_SWAP))
OpenPOWER on IntegriCloud