PERFORCE change 110957 for review
Roman Divacky
rdivacky at FreeBSD.org
Sun Dec 3 09:47:17 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=110957
Change 110957 by rdivacky at rdivacky_witten on 2006/12/03 17:46:16
Use TAILQ_FOREACH_SAFE instead of unsafe variant in linsysfs_uninit
because we are deleting the element we are using.
Affected files ...
.. //depot/projects/linuxolator/src/sys/compat/linsysfs/linsysfs.c#2 edit
Differences ...
==== //depot/projects/linuxolator/src/sys/compat/linsysfs/linsysfs.c#2 (text) ====
@@ -268,9 +268,10 @@
static int
linsysfs_uninit(PFS_INIT_ARGS)
{
- struct scsi_host_queue *scsi_host;
+ struct scsi_host_queue *scsi_host, *scsi_host_temp;
- TAILQ_FOREACH(scsi_host, &scsi_host_q, scsi_host_next) {
+ TAILQ_FOREACH_SAFE(scsi_host, &scsi_host_q, scsi_host_next,
+ scsi_host_temp) {
TAILQ_REMOVE(&scsi_host_q, scsi_host, scsi_host_next);
free(scsi_host->path, M_TEMP);
free(scsi_host, M_TEMP);
More information about the p4-projects
mailing list