From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXqJP-0004nG-CL for qemu-devel@nongnu.org; Mon, 12 Nov 2012 04:28:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXqJM-0006eO-9a for qemu-devel@nongnu.org; Mon, 12 Nov 2012 04:28:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:22181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXqJM-0006eH-1N for qemu-devel@nongnu.org; Mon, 12 Nov 2012 04:28:08 -0500 Message-ID: <50A0C11E.5020409@redhat.com> Date: Mon, 12 Nov 2012 10:27:58 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1352093924-17598-1-git-send-email-qemulist@gmail.com> <1352093924-17598-4-git-send-email-qemulist@gmail.com> In-Reply-To: <1352093924-17598-4-git-send-email-qemulist@gmail.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 3/8] hotplug: introduce qdev_unplug_complete() to remove device from views List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Ping Fan Cc: Peter Maydell , Stefan Hajnoczi , Marcelo Tosatti , qemu-devel@nongnu.org, Avi Kivity , Anthony Liguori , Jan Kiszka Il 05/11/2012 06:38, Liu Ping Fan ha scritto: > +void qdev_unplug_complete(DeviceState *dev, Error **errp) > +{ > + /* isolate from mem view */ > + qdev_unmap(dev); > + /* isolate from device tree */ > + qdev_unset_parent(dev); > + object_unref(OBJECT(dev)); This leaks the device. I'll send a patch to fix this, please include it in v7. Paolo > +} > +