[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] blockdev: Fix wrong usage of QDECREF causing snapsh
From: |
Benoît Canet |
Subject: |
[Qemu-devel] [PATCH] blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close. |
Date: |
Thu, 13 Feb 2014 17:22:33 +0100 |
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 <address@hidden>
---
blockdev.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 5cd50f3..7fbce6c 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1316,8 +1316,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)
--
1.8.3.2