diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/mirror.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/block/mirror.c b/block/mirror.c index 001b5f0a15..f24dc51385 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1197,10 +1197,7 @@ static void mirror_start_job(const char *job_id, BlockDriverState *bs, s->dirty_bitmap = bdrv_create_dirty_bitmap(bs, granularity, NULL, errp); if (!s->dirty_bitmap) { - g_free(s->replaces); - blk_unref(s->target); - block_job_unref(&s->common); - return; + goto fail; } /* Required permissions are already taken with blk_new() */ |