diff options
author | Ariane van der Steldt <ariane@cvs.openbsd.org> | 2010-04-23 20:42:23 +0000 |
---|---|---|
committer | Ariane van der Steldt <ariane@cvs.openbsd.org> | 2010-04-23 20:42:23 +0000 |
commit | f1d794a9b17cf8734d2782ac3380034fcc502600 (patch) | |
tree | 122275bcf9e51f7414e8412e9228afd477f4be79 /sys | |
parent | 66de273ba45b0055a0f5c994a9dce9ee4b1fe706 (diff) |
Fix null-pointer dereference.
ok oga
Diffstat (limited to 'sys')
-rw-r--r-- | sys/uvm/uvm_pmemrange.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/uvm/uvm_pmemrange.c b/sys/uvm/uvm_pmemrange.c index 19a6a4f94f1..d62edb33eb3 100644 --- a/sys/uvm/uvm_pmemrange.c +++ b/sys/uvm/uvm_pmemrange.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pmemrange.c,v 1.10 2010/04/22 19:02:55 oga Exp $ */ +/* $OpenBSD: uvm_pmemrange.c,v 1.11 2010/04/23 20:42:22 ariane Exp $ */ /* * Copyright (c) 2009, 2010 Ariane van der Steldt <ariane@stack.nl> @@ -1669,11 +1669,12 @@ uvm_pmr_get1page(psize_t count, int memtype_init, struct pglist *result, if (found == NULL) { found = RB_ROOT(&pmr->size[memtype]); /* Size tree gives pg[1] instead of pg[0] */ - if (found != NULL) + if (found != NULL) { found--; - found = uvm_pmr_rootupdate(pmr, found, - start, end, memtype); + found = uvm_pmr_rootupdate(pmr, found, + start, end, memtype); + } } if (found != NULL) { uvm_pmr_assertvalid(pmr); |