qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v6 01/15] blockdev: Add missing bdrv_unref() in driv


From: Max Reitz
Subject: [Qemu-devel] [PATCH v6 01/15] blockdev: Add missing bdrv_unref() in drive-backup
Date: Wed, 4 Nov 2015 19:57:33 +0100

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 <address@hidden>
---
 blockdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/blockdev.c b/blockdev.c
index ac2a537..4eda49c 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2899,6 +2899,7 @@ void qmp_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;
         }
     }
-- 
2.6.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]