On 02/13/2012 05:58 AM, Michael S. Tsirkin wrote:
Doesn't solve this issue, but shouldn't we use _SAFE
in object_property_del_child? Like this:
--->
qemu: use safe list macro
As we might remove an element from list, use the safe macro
to walk it.
Signed-off-by: Michael S. Tsirkin <m...@redhat.com>
---
diff --git a/qom/object.c b/qom/object.c
index 5e5b261..8b64fb6 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -299,9 +299,9 @@ static void object_property_del_all(Object *obj)
static void object_property_del_child(Object *obj, Object *child, Error **errp)
{
- ObjectProperty *prop;
+ ObjectProperty *prop, *next;
- QTAILQ_FOREACH(prop, &obj->properties, node) {
+ QTAILQ_FOREACH_SAFE(prop, &obj->properties, node, next) {
if (!strstart(prop->type, "child<", NULL)) {
continue;
}
Yup, I thought I had pointed this out in a review of Anthony's QOM series...
Reviewed-by: Paolo Bonzini <pbonz...@redhat.com>
Paolo