From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuhVV-00086b-HX for qemu-devel@nongnu.org; Wed, 11 Jun 2014 08:20:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuhVM-0001RM-C9 for qemu-devel@nongnu.org; Wed, 11 Jun 2014 08:19:57 -0400 Received: from mail-we0-x230.google.com ([2a00:1450:400c:c03::230]:34466) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuhVM-0001R7-6T for qemu-devel@nongnu.org; Wed, 11 Jun 2014 08:19:48 -0400 Received: by mail-we0-f176.google.com with SMTP id u56so4579989wes.35 for ; Wed, 11 Jun 2014 05:19:47 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 11 Jun 2014 14:19:27 +0200 Message-Id: <1402489176-19738-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1402489176-19738-1-git-send-email-pbonzini@redhat.com> References: <1402489176-19738-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [RFC PATCH 04/13] qom: 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, afaerber@suse.de 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 69a95d6..780aaa8 100644 --- a/qom/object.c +++ b/qom/object.c @@ -407,8 +407,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