mirror of https://gitee.com/openkylin/qemu.git
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>
This commit is contained in:
parent
cc67f4d1f9
commit
57b6bdf37c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue