Turns out that using more than one state doesn't really work well. I'm trying to reproduce a bug for which I need states, so now is the time to fix it.
v2: - Use Markus' qemu_opts_reset for freeing QemuOpts. Makes the code reusable and fixes a use-after-free bug. Kevin Wolf (3): blkdebug: Fix set_state_opts definition blkdebug: Free QemuOpts after having read the config blkdebug: Initialize state as 1 Markus Armbruster (1): qemu-option: New qemu_opts_reset() block/blkdebug.c | 7 ++++++- qemu-option.c | 9 +++++++++ qemu-option.h | 1 + 3 files changed, 16 insertions(+), 1 deletions(-)