diff options
author | Max Reitz <mreitz@redhat.com> | 2015-11-09 23:39:10 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-11-18 16:05:56 +0100 |
commit | 0702d3d88c2059814212b83f01e14ff3bb7b0c66 (patch) | |
tree | dcf58744e3a4a33a0d26d223a39d7946a3d2471a /blockdev.c | |
parent | 01809194a06d8e6c51c3e69600f14355225f4855 (diff) |
blockdev: Add missing bdrv_unref() in drive-backup
All error paths after a successful bdrv_open() of target_bs should
contain a bdrv_unref(target_bs). This one did not yet, so add it.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/blockdev.c b/blockdev.c index 917ae0687f..07c1741214 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3171,6 +3171,7 @@ static void do_drive_backup(const char *device, const char *target, bmap = bdrv_find_dirty_bitmap(bs, bitmap); if (!bmap) { error_setg(errp, "Bitmap '%s' could not be found", bitmap); + bdrv_unref(target_bs); goto out; } } |