d41a2ba73c
Use LIST_FOREACH_SAFE to avoid a use-after-free in scmi_reqs_pool_free. The next pointer will be invalid after the call to free meaning LIST_FOREACH will dereference a freed struct to move to the next item. Reviewed by: emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D50753