diff options
author | Alberto Garcia <berto@igalia.com> | 2018-11-22 17:00:26 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-02-01 13:46:44 +0100 |
commit | e917e2cb2a1715233d173de57a889808b703091e (patch) | |
tree | 191e2e1fe8f7cc41c8a2a5dfb1eb2bf3c9e30a3b /block | |
parent | cfe6c547690b06fbce54a6d0f7b05dd7f18e36ea (diff) |
mirror: Release the dirty bitmap if mirror_start_job() fails
At the moment I don't see how to make this function fail after the
dirty bitmap has been created, but if that was possible then we would
hit the assert(QLIST_EMPTY(&bs->dirty_bitmaps)) in bdrv_close().
Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/mirror.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/mirror.c b/block/mirror.c index 24ede6fdaa..4cf1c088c0 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1649,6 +1649,9 @@ fail: g_free(s->replaces); blk_unref(s->target); bs_opaque->job = NULL; + if (s->dirty_bitmap) { + bdrv_release_dirty_bitmap(bs, s->dirty_bitmap); + } job_early_fail(&s->common.job); } |