From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEMaR-0000Ea-QI for qemu-devel@nongnu.org; Fri, 14 Feb 2014 12:30:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WEMaM-0004ck-Qm for qemu-devel@nongnu.org; Fri, 14 Feb 2014 12:30:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEMaM-0004ca-JK for qemu-devel@nongnu.org; Fri, 14 Feb 2014 12:29:58 -0500 From: Stefan Hajnoczi Date: Fri, 14 Feb 2014 18:29:31 +0100 Message-Id: <1392398973-15092-10-git-send-email-stefanha@redhat.com> In-Reply-To: <1392398973-15092-1-git-send-email-stefanha@redhat.com> References: <1392398973-15092-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 09/11] blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Anthony Liguori From: Beno=C3=AEt Canet 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 th= e * 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 Reviewed-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- blockdev.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index d5f21f0..ccd6a72 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1329,8 +1329,6 @@ static void external_snapshot_prepare(BlkTransactio= nState *common, if (ret !=3D 0) { error_propagate(errp, local_err); } - - QDECREF(options); } =20 static void external_snapshot_commit(BlkTransactionState *common) --=20 1.8.5.3