On 02/02/2017 15:51, Marc-André Lureau wrote: > + if (QTAILQ_IN_USE(chr, next)) { > + QTAILQ_REMOVE(&chardevs, chr, next); > + } > + if (OBJECT(chr)->parent) { > + object_unparent(OBJECT(chr)); > + } else { > + object_unref(OBJECT(chr)); > + }
What's the case where the "else" is used? Probably qemu_chr_delete callers should be changed to use object_unparent or object_unref directly. Paolo