Another Coverity fix from Sam: add NULL pointer test in

NdisMFreeSharedMemory() (if the list is already empty, just bail).
This commit is contained in:
Bill Paul 2005-03-28 21:09:00 +00:00
parent f3d5302e1a
commit c6cb2045e4

View File

@ -1586,6 +1586,11 @@ NdisMFreeSharedMemory(adapter, len, cached, vaddr, paddr)
sc = device_get_softc(block->nmb_physdeviceobj->do_devext);
sh = prev = sc->ndis_shlist;
/* Sanity check: is list empty? */
if (sh == NULL)
return;
while (sh) {
if (sh->ndis_saddr == vaddr)
break;