Am 27.05.2014 02:39, schrieb Peter Crosthwaite: > 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.crosthwa...@xilinx.com> > --- > > qom/object.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/qom/object.c b/qom/object.c > index e42b254..8319e89 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); > } >
This looks okay to me, and it might also help the segfault on hot-unplug Stefan and Kevin reported before I went on travels. Any objection to moving this one line up into the if? Regards, Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg