Another Coverity fix from Sam: add NULL pointer test in
NdisMFreeSharedMemory() (if the list is already empty, just bail).
This commit is contained in:
parent
f3d5302e1a
commit
c6cb2045e4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user