From 7a16318855811ac4ae55d30b77969528099fd180 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 17 Mar 2020 15:31:12 +0100 Subject: [PATCH] qemuBlockBitmapsHandleCommitFinish: Use proper variable to iterate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The function repeatedly checked the first element rather than iterating through the array. Reported-by: Daniel P. Berrangé Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko Reviewed-by: Daniel P. Berrangé Tested-by: Daniel P. Berrangé --- src/qemu/qemu_block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 115682c39d..f95ebb6fa7 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -3177,7 +3177,7 @@ qemuBlockBitmapsHandleCommitFinish(virStorageSourcePtr topsrc, char **disabledbitmaps; for (disabledbitmaps = disabledBitmapsBase; *disabledbitmaps; disabledbitmaps++) { - if (STREQ(*disabledBitmapsBase, bitmap->name)) { + if (STREQ(*disabledbitmaps, bitmap->name)) { bitmapdata = g_new0(struct qemuBlockBitmapsHandleCommitData, 1); bitmapdata->create = false; -- GitLab