summaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorBenoƮt Canet <benoit.canet@irqsave.net>2014-02-13 17:22:33 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2014-02-14 18:05:39 +0100
commit57b6bdf37c64985cf02b8737c550d52759059c9d (patch)
tree7af75dbbd25f396f1665f479fffb3397b57c9336 /blockdev.c
parentcc67f4d1f9645e8e6d90aee84ca19162d661f082 (diff)
downloadqemu-57b6bdf37c64985cf02b8737c550d52759059c9d.tar.gz
blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close.
As bdrv_open() documentation states: "The reference to the QDict belongs to the block layer * after the call (even on failure), so if the caller intends to reuse the * dictionary, it needs to use QINCREF() before calling bdrv_open." the optional options dict will not be reused after bdrv_open() and should belong to the block layer so remove the extra QDECREF(options). Signed-off-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/blockdev.c b/blockdev.c
index d5f21f07b7..ccd6a72e92 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1329,8 +1329,6 @@ static void external_snapshot_prepare(BlkTransactionState *common,
if (ret != 0) {
error_propagate(errp, local_err);
}
-
- QDECREF(options);
}
static void external_snapshot_commit(BlkTransactionState *common)