From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCR6Z-0000so-J1 for qemu-devel@nongnu.org; Wed, 30 Jul 2014 06:27:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCR6O-0000wR-Iq for qemu-devel@nongnu.org; Wed, 30 Jul 2014 06:27:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCR6O-0000wC-CI for qemu-devel@nongnu.org; Wed, 30 Jul 2014 06:27:20 -0400 From: Paolo Bonzini Date: Wed, 30 Jul 2014 12:27:04 +0200 Message-Id: <1406716032-21795-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1406716032-21795-1-git-send-email-pbonzini@redhat.com> References: <1406716032-21795-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 1/9] qom: object: delete properties before calling instance_finalize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.crosthwaite@xilinx.com This ensures that the children's unparent callback will still have a usable parent. Signed-off-by: Paolo Bonzini --- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qom/object.c b/qom/object.c index 0e8267b..f301bc2 100644 --- a/qom/object.c +++ b/qom/object.c @@ -418,8 +418,8 @@ static void object_finalize(void *data) Object *obj = data; TypeImpl *ti = obj->class->type; - object_deinit(obj, ti); object_property_del_all(obj); + object_deinit(obj, ti); g_assert(obj->ref == 0); if (obj->free) { -- 1.8.3.1