qom: Make object_child_foreach() safe for objects removal
commit8af734ca318369c4eb76f355ed4cc7d4e6abc2a6
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Sun, 13 Jul 2014 14:41:08 +0000 (14 00:41 +1000)
committerAndreas Färber <afaerber@suse.de>
Thu, 4 Sep 2014 14:14:47 +0000 (4 16:14 +0200)
tree98d98a591f95c2f05ef9fc2205b19dc92848053e
parent01eb313907dda97313b8fea62e5632fca64f069c
qom: Make object_child_foreach() safe for objects removal

Current object_child_foreach() uses QTAILQ_FOREACH() to walk
through children and that makes children removal from the callback
impossible.

This makes object_child_foreach() use QTAILQ_FOREACH_SAFE().

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
qom/object.c