On Mon, Sep 21, 2026 at 9:37 PM Stefan Hajnoczi <[email protected]> wrote:
>
> On Tue, Sep 15, 2026 at 06:16:49PM +0800, Zhang Chen wrote:
> > @@ -1404,6 +1410,7 @@ static void colo_compare_finalize(Object *obj)
> >  {
> >      CompareState *s = COLO_COMPARE(obj);
> >      CompareState *tmp;
> > +    g_autofree char *path = object_get_canonical_path(OBJECT(s));
>
> Did you test this? I think object_get_canonical_path() doesn't work here
> because the object's ->parent link is already NULL:
>
>   static void object_finalize_child_property(Object *obj, const char *name,
>                                              void *opaque)
>   {
>       Object *child = opaque;
>
>       if (child->class->unparent) {
>           (child->class->unparent)(child);
>       }
>       child->parent = NULL;
>       ^^^^^^^^^^^^^^^^^^^^^
>       object_unref(child);
>       ^^   we are here  ^^
>   }
>

Thanks for catching this. You're right — the canonical path is no longer
available in finalize().

The local fix saves the path(like the monitor parts we discussed) when
registering
the holder and reuses it in finalize(). I've verified object-del, quit, and
initialization-failure cleanup with the fix. Will update it in the next version.

Thanks
Chen

> Stefan

Reply via email to