From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Peter Crosthwaite" <peter.crosthwaite@xilinx.com>,
"Andreas Färber" <afaerber@suse.de>,
"Anthony Liguori" <aliguori@amazon.com>
Subject: [Qemu-devel] [PULL 1/5] qom: Remove parent pointer when unparenting
Date: Tue, 1 Jul 2014 05:08:09 +0200 [thread overview]
Message-ID: <1404184093-966-2-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1404184093-966-1-git-send-email-afaerber@suse.de>
From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Certain parts of the QOM framework test this pointer to determine if
an object is parented. Nuke it when the object is unparented to allow
for reuse of an object after unparenting.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
qom/object.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/qom/object.c b/qom/object.c
index 3876618..7cefdf2 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -402,6 +402,7 @@ void object_unparent(Object *obj)
}
if (obj->parent) {
object_property_del_child(obj->parent, obj, NULL);
+ obj->parent = NULL;
}
object_unref(obj);
}
--
1.8.4.5
next prev parent reply other threads:[~2014-07-01 3:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-01 3:08 [Qemu-devel] [PULL 0/5] QOM devices patch queue 2014-07-01 Andreas Färber
2014-07-01 3:08 ` Andreas Färber [this message]
2014-07-01 3:08 ` [Qemu-devel] [PULL 2/5] sdhci: Fix misuse of qemu_free_irqs() Andreas Färber
2014-07-01 3:08 ` [Qemu-devel] [PULL 3/5] hw: Fix qemu_allocate_irqs() leaks Andreas Färber
2014-07-01 3:08 ` [Qemu-devel] [PULL 4/5] irq: Allocate IRQs individually Andreas Färber
2014-07-01 3:08 ` [Qemu-devel] [PULL 5/5] irq: Slim conversion of qemu_irq to QOM Andreas Färber
2014-07-01 10:55 ` [Qemu-devel] [PULL 0/5] QOM devices patch queue 2014-07-01 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1404184093-966-2-git-send-email-afaerber@suse.de \
--to=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).