vm: fix potential null deref

This commit is contained in:
Ben Gras 2012-10-24 19:47:47 +02:00
parent 0ab81d2491
commit aefc6db005

View file

@ -830,7 +830,7 @@ struct phys_region **physr;
ph = offset - r->vaddr; ph = offset - r->vaddr;
if(physr) { if(physr) {
*physr = physr_search(r->phys, ph, AVL_EQUAL); *physr = physr_search(r->phys, ph, AVL_EQUAL);
assert((*physr)->offset == ph); if(*physr) assert((*physr)->offset == ph);
} }
return r; return r;
} }