From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJgsw-0004BM-HY for qemu-devel@nongnu.org; Tue, 19 Aug 2014 06:43:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJgsr-0004Wj-EZ for qemu-devel@nongnu.org; Tue, 19 Aug 2014 06:43:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJgsr-0004Wd-6O for qemu-devel@nongnu.org; Tue, 19 Aug 2014 06:43:21 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7JAhK7j018201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Aug 2014 06:43:20 -0400 Received: from playground.com (ovpn-112-29.ams2.redhat.com [10.36.112.29]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7JAh67E013080 for ; Tue, 19 Aug 2014 06:43:19 -0400 From: Paolo Bonzini Date: Tue, 19 Aug 2014 12:42:49 +0200 Message-Id: <1408444983-21464-7-git-send-email-pbonzini@redhat.com> In-Reply-To: <1408444983-21464-1-git-send-email-pbonzini@redhat.com> References: <1408444983-21464-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 06/20] 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 This ensures that the children's unparent callback will still have a usable parent. Reviewed-by: Peter Crosthwaite 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