Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157045047
D19109.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
908 B
Referenced Files
None
Subscribers
None
D19109.diff
View Options
Index: head/sys/cam/scsi/scsi_xpt.c
===================================================================
--- head/sys/cam/scsi/scsi_xpt.c
+++ head/sys/cam/scsi/scsi_xpt.c
@@ -1385,6 +1385,12 @@
probe_purge_old(path, lp, softc->flags);
lp = NULL;
}
+ /* The processing above should either exit via a `goto
+ * out` or leave the `lp` variable `NULL` and (if
+ * applicable) `free()` the storage to which it had
+ * pointed. Assert here that is the case.
+ */
+ KASSERT(lp == NULL, ("%s: lp is not NULL", __func__));
inq_buf = &path->device->inq_data;
if (path->device->flags & CAM_DEV_INQUIRY_DATA_VALID &&
(SID_QUAL(inq_buf) == SID_QUAL_LU_CONNECTED ||
@@ -1397,9 +1403,6 @@
xpt_release_ccb(done_ccb);
xpt_schedule(periph, priority);
goto out;
- }
- if (lp) {
- free(lp, M_CAMXPT);
}
PROBE_SET_ACTION(softc, PROBE_INVALID);
xpt_release_ccb(done_ccb);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 19, 2:51 AM (14 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33287918
Default Alt Text
D19109.diff (908 B)
Attached To
Mode
D19109: CID 1009492: Logically dead code in sys/cam/scsi/scsi_xpt.c
Attached
Detach File
Event Timeline
Log In to Comment