]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[settings] Use list_first_entry() when unregistering child settings
authorMichael Brown <mcb30@ipxe.org>
Tue, 3 Mar 2015 00:29:42 +0000 (00:29 +0000)
committerMichael Brown <mcb30@ipxe.org>
Tue, 3 Mar 2015 00:29:42 +0000 (00:29 +0000)
commit0af3d14a2379fd7775ef09b5f882682496f7cbe6
treeda442a2ccefd1789597d71119124b4f5fc709ba9
parente399fc0d216533a5351631b6bc8bb97c898bc877
[settings] Use list_first_entry() when unregistering child settings

Unregistering a child settings block can have almost arbitrary
effects, due to the call to apply_settings().  Avoid potentially
dereferencing a stale pointer by using list_first_entry() rather than
list_for_each_entry_safe() to iterate over the list of child settings.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/settings.c