From patchwork Fri Sep 12 19:26:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 388770 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4519C140114 for ; Sat, 13 Sep 2014 05:27:08 +1000 (EST) Received: from localhost ([::1]:47023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSWUs-0008Cz-A8 for incoming@patchwork.ozlabs.org; Fri, 12 Sep 2014 15:27:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSWUN-0007XG-PL for qemu-devel@nongnu.org; Fri, 12 Sep 2014 15:26:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSWUH-00038c-L5 for qemu-devel@nongnu.org; Fri, 12 Sep 2014 15:26:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSWUH-00038L-CR for qemu-devel@nongnu.org; Fri, 12 Sep 2014 15:26:29 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8CJQRFa020871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 12 Sep 2014 15:26:27 -0400 Received: from blackfin.pond.sub.org (ovpn-116-42.ams2.redhat.com [10.36.116.42]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8CJQP5V010679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 12 Sep 2014 15:26:26 -0400 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id BBE2430408AA; Fri, 12 Sep 2014 21:26:24 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Fri, 12 Sep 2014 21:26:23 +0200 Message-Id: <1410549984-16110-4-git-send-email-armbru@redhat.com> In-Reply-To: <1410549984-16110-1-git-send-email-armbru@redhat.com> References: <1410549984-16110-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, benoit.canet@irqsave.net, stefanha@redhat.com Subject: [Qemu-devel] [PATCH 3/4] qemu-nbd: Destroy the BlockDriverState properly X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Match the bdrv_new() with a bdrv_unref(), just to be tidy. Signed-off-by: Markus Armbruster --- qemu-nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 9bc152e..f3cf8a2 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -769,7 +769,7 @@ int main(int argc, char **argv) } } while (state != TERMINATED); - bdrv_close(bs); + bdrv_unref(bs); if (sockpath) { unlink(sockpath); }