aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block/monitor/bitmap-qmp-cmds.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/block/monitor/bitmap-qmp-cmds.c b/block/monitor/bitmap-qmp-cmds.c
index 2b677c4..bd10468 100644
--- a/block/monitor/bitmap-qmp-cmds.c
+++ b/block/monitor/bitmap-qmp-cmds.c
@@ -309,7 +309,10 @@ BdrvDirtyBitmap *block_dirty_bitmap_merge(const char *node, const char *target,
}
/* Merge into dst; dst is unchanged on failure. */
- bdrv_merge_dirty_bitmap(dst, anon, backup, errp);
+ if (!bdrv_merge_dirty_bitmap(dst, anon, backup, errp)) {
+ dst = NULL;
+ goto out;
+ }
out:
bdrv_release_dirty_bitmap(anon);