]> Zhao Yanbai Git Server - minix.git/commitdiff
vm: fix potential null deref
authorBen Gras <ben@minix3.org>
Wed, 24 Oct 2012 17:47:47 +0000 (19:47 +0200)
committerBen Gras <ben@minix3.org>
Wed, 24 Oct 2012 17:47:47 +0000 (19:47 +0200)
servers/vm/region.c

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