HomeFreeBSD

stge: fix null pointer dereference

Description

stge: fix null pointer dereference

stge_attach() could fail at line 464, sc->sc_spec remains NULL when
calling stge_detach(), thus bus_release_resources() at line 704 will
trigger null pointer dereference. We need to check the nulliness before
calling bus_release_resources().

PR: 258420
Reviewed by: markj

(cherry picked from commit 2108cc72906f274f30306570268434c4f8d23636)

Details

Provenance
ztong0001_gmail.comAuthored on Mar 31 2022, 6:16 PM
markjCommitted on Apr 7 2022, 12:30 AM
Parents
rG229eff21b725: uma: Use the correct type for a return value
Branches
Unknown
Tags
Unknown