From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsznN-00045t-Jx for qemu-devel@nongnu.org; Thu, 02 Feb 2012 11:46:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsznJ-0002YP-Fu for qemu-devel@nongnu.org; Thu, 02 Feb 2012 11:46:01 -0500 Received: from mail-pz0-f45.google.com ([209.85.210.45]:35764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsznJ-0002WX-44 for qemu-devel@nongnu.org; Thu, 02 Feb 2012 11:45:57 -0500 Received: by mail-pz0-f45.google.com with SMTP id p14so2506378dad.4 for ; Thu, 02 Feb 2012 08:45:56 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 2 Feb 2012 17:45:27 +0100 Message-Id: <1328201142-26145-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1328201142-26145-1-git-send-email-pbonzini@redhat.com> References: <1328201142-26145-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org The reference that is returned by qdev_device_add is never given back, so that device_del does not cause the refcount to go to zero (and thus does nothing). Signed-off-by: Paolo Bonzini --- vl.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index d88a18c..c63af69 100644 --- a/vl.c +++ b/vl.c @@ -1746,6 +1746,7 @@ static int device_init_func(QemuOpts *opts, void *opaque) dev = qdev_device_add(opts); if (!dev) return -1; + object_unref(OBJECT(dev)); return 0; } -- 1.7.7.6