]> git.ipfire.org Git - thirdparty/grub.git/commit
loader/arm64/xen_boot: Remove correctly all modules loaded by xen_module command
authorFrediano Ziglio <frediano.ziglio@cloud.com>
Fri, 4 Jul 2025 08:39:08 +0000 (09:39 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 11 Jul 2025 14:33:08 +0000 (16:33 +0200)
commitd1a470b694cb73dd053af02081198ef4e5688852
treeb671e81a4a3bf07d72fa9bc0f72c3492e6d96ad2
parentcf5e52fa85ddabe919d30a5763690d2c6c48d1b8
loader/arm64/xen_boot: Remove correctly all modules loaded by xen_module command

We need to use FOR_LIST_ELEMENTS_SAFE() instead of FOR_LIST_ELEMENTS()
as single_binary_unload(), called during the loop, is changing the list
using grub_list_remove(). Given the environment probably the old code
simply removed only the first module on the list not freeing all the others.

Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>
grub-core/loader/arm64/xen_boot.c