fix potential null ptr deref
Submitted by: Coverity Prevent analysis tool
This commit is contained in:
parent
14d15addab
commit
b083b7c98d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144263
@ -2292,10 +2292,6 @@ dump_db(struct fwohci_softc *sc, uint32_t ch)
|
|||||||
pp = dbch->top;
|
pp = dbch->top;
|
||||||
prev = pp->db;
|
prev = pp->db;
|
||||||
for(idb = 0 ; idb < dbch->ndb ; idb ++ ){
|
for(idb = 0 ; idb < dbch->ndb ; idb ++ ){
|
||||||
if(pp == NULL){
|
|
||||||
curr = NULL;
|
|
||||||
goto outdb;
|
|
||||||
}
|
|
||||||
cp = STAILQ_NEXT(pp, link);
|
cp = STAILQ_NEXT(pp, link);
|
||||||
if(cp == NULL){
|
if(cp == NULL){
|
||||||
curr = NULL;
|
curr = NULL;
|
||||||
@ -2314,6 +2310,10 @@ dump_db(struct fwohci_softc *sc, uint32_t ch)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pp = STAILQ_NEXT(pp, link);
|
pp = STAILQ_NEXT(pp, link);
|
||||||
|
if(pp == NULL){
|
||||||
|
curr = NULL;
|
||||||
|
goto outdb;
|
||||||
|
}
|
||||||
prev = pp->db;
|
prev = pp->db;
|
||||||
}
|
}
|
||||||
outdb:
|
outdb:
|
||||||
|
Loading…
Reference in New Issue
Block a user