qemuBlockBitmapsHandleCommitFinish: Use proper variable to iterate

The function repeatedly checked the first element rather than iterating
through the array.

Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Tested-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Peter Krempa 2020-03-17 15:31:12 +01:00
parent 061057e754
commit 7a16318855

View File

@ -3177,7 +3177,7 @@ qemuBlockBitmapsHandleCommitFinish(virStorageSourcePtr topsrc,
char **disabledbitmaps; char **disabledbitmaps;
for (disabledbitmaps = disabledBitmapsBase; *disabledbitmaps; disabledbitmaps++) { for (disabledbitmaps = disabledBitmapsBase; *disabledbitmaps; disabledbitmaps++) {
if (STREQ(*disabledBitmapsBase, bitmap->name)) { if (STREQ(*disabledbitmaps, bitmap->name)) {
bitmapdata = g_new0(struct qemuBlockBitmapsHandleCommitData, 1); bitmapdata = g_new0(struct qemuBlockBitmapsHandleCommitData, 1);
bitmapdata->create = false; bitmapdata->create = false;