qemu-option: Allow deleting opts during qemu_opts_foreach()
commit30648dd5d609d111e635112d7e6014ca63f7ba13
authorKevin Wolf <kwolf@redhat.com>
Fri, 8 Oct 2021 13:34:37 +0000 (8 15:34 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 15 Oct 2021 14:11:22 +0000 (15 16:11 +0200)
tree7d75569fee18ec37740e93300649932e02a551a9
parent4a1d937796de0fecd8b22d7dbebf87f38e8282fd
qemu-option: Allow deleting opts during qemu_opts_foreach()

Use QTAILQ_FOREACH_SAFE() so that the current QemuOpts can be deleted
while iterating through the whole list.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20211008133442.141332-11-kwolf@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
util/qemu-option.c