Commit e917e2cb authored by Alberto Garcia's avatar Alberto Garcia Committed by Kevin Wolf
Browse files

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: default avatarAlberto Garcia <berto@igalia.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent cfe6c547
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
    }