[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/6] block: fix bdrv_root_attach_child forget to unref child_bs
From: |
Kevin Wolf |
Subject: |
[PULL 2/6] block: fix bdrv_root_attach_child forget to unref child_bs |
Date: |
Fri, 27 Mar 2020 16:19:46 +0100 |
From: Vladimir Sementsov-Ogievskiy <address@hidden>
bdrv_root_attach_child promises to drop child_bs reference on failure.
It does it on first handled failure path, but not on the second. Fix
that.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block.c b/block.c
index af3faf664e..2e3905c99e 100644
--- a/block.c
+++ b/block.c
@@ -2617,6 +2617,7 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState
*child_bs,
error_propagate(errp, local_err);
g_free(child);
bdrv_abort_perm_update(child_bs);
+ bdrv_unref(child_bs);
return NULL;
}
}
--
2.20.1
- [PULL 0/6] Block layer patches, Kevin Wolf, 2020/03/27
- [PULL 2/6] block: fix bdrv_root_attach_child forget to unref child_bs,
Kevin Wolf <=
- [PULL 1/6] block/iscsi:use the flags in iscsi_open() prevent Clang warning, Kevin Wolf, 2020/03/27
- [PULL 3/6] nvme: Print 'cqid' for nvme_del_cq, Kevin Wolf, 2020/03/27
- [PULL 4/6] Revert "mirror: Don't let an operation wait for itself", Kevin Wolf, 2020/03/27
- [PULL 5/6] mirror: Wait only for in-flight operations, Kevin Wolf, 2020/03/27
- [PULL 6/6] qcow2: Remove unused fields from BDRVQcow2State, Kevin Wolf, 2020/03/27
- Re: [PULL 0/6] Block layer patches, Peter Maydell, 2020/03/27