]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r344024:
authordab <dab@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 20 Feb 2019 22:49:09 +0000 (22:49 +0000)
committerdab <dab@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 20 Feb 2019 22:49:09 +0000 (22:49 +0000)
commitf3b4f561ab8c6b1ea758ca979435e73a8f5808a0
treec24e632ffdfa3575ea7d5f3e8e33272a0111f583
parent7dfdde3da601e1c2be83388db9d7e4ab5a6ca973
MFC r344024:

CID 1009492: Logically dead code in sys/cam/scsi/scsi_xpt.c

In `probedone()`, for the `PROBE_REPORT_LUNS` case, all paths that
fall to the bottom of the case set `lp` to `NULL`, so the test for a
non-NULL value of `lp` and call to `free()` if true is dead code as
the test can never be true. Fix by eliminating the whole if
statement. To guard against a possible future change that accidentally
violates this assumption, use a `KASSERT()` to catch if `lp` is
non-NULL.

Sponsored by: Dell EMC Isilon

git-svn-id: svn://svn.freebsd.org/base/stable/10@344394 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cam/scsi/scsi_xpt.c