mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
Guard against NULL pointer dereference.
Reviewed by: scottl Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation Found with: Coverity Prevent(tm) CID: 1847
This commit is contained in:
parent
53f8b22b34
commit
ac37e649a9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=187650
@ -4177,7 +4177,10 @@ xpt_path_string(struct cam_path *path, char *str, size_t str_len)
|
||||
{
|
||||
struct sbuf sb;
|
||||
|
||||
mtx_assert(path->bus->sim->mtx, MA_OWNED);
|
||||
#ifdef INVARIANTS
|
||||
if (path != NULL && path->bus != NULL && path->bus->sim != NULL)
|
||||
mtx_assert(path->bus->sim->mtx, MA_OWNED);
|
||||
#endif
|
||||
|
||||
sbuf_new(&sb, str, str_len, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user