diff options
author | sam <sam@FreeBSD.org> | 2005-03-29 01:44:59 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-03-29 01:44:59 +0000 |
commit | 1d91e248e52e6eaddddedbc66bcbe415cbb0e2f7 (patch) | |
tree | 9de776ccad1c31a12fc8d8933c0aeab7e38a9398 | |
parent | 61bf6bf48d068d19a6d9abdb529765b01a40c664 (diff) | |
download | FreeBSD-src-1d91e248e52e6eaddddedbc66bcbe415cbb0e2f7.zip FreeBSD-src-1d91e248e52e6eaddddedbc66bcbe415cbb0e2f7.tar.gz |
fix potential null ptr deref
Submitted by: Coverity Prevent analysis tool
-rw-r--r-- | sys/dev/firewire/fwohci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index ddcd05d..bdf75e8 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -2292,10 +2292,6 @@ dump_db(struct fwohci_softc *sc, uint32_t ch) pp = dbch->top; prev = pp->db; for(idb = 0 ; idb < dbch->ndb ; idb ++ ){ - if(pp == NULL){ - curr = NULL; - goto outdb; - } cp = STAILQ_NEXT(pp, link); if(cp == NULL){ curr = NULL; @@ -2314,6 +2310,10 @@ dump_db(struct fwohci_softc *sc, uint32_t ch) } } pp = STAILQ_NEXT(pp, link); + if(pp == NULL){ + curr = NULL; + goto outdb; + } prev = pp->db; } outdb: |