pci/shpc: Do not unparent in instance_finalize()
Children are automatically unparented so manually unparenting is unnecessary. Worse, automatic unparenting happens before the instance_finalize() callback of the parent gets called, so object_unparent() calls in the callback will refer to objects that are already unparented, which is semantically incorrect. Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20251027-shpc-v1-1-00e9b20a355d@rsg.ci.i.u-tokyo.ac.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20251027-shpc-v1-1-00e9b20a355d@rsg.ci.i.u-tokyo.ac.jp>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
196ac25441
commit
6d8dd5ec08
@@ -735,7 +735,6 @@ void shpc_free(PCIDevice *d)
|
||||
if (!shpc) {
|
||||
return;
|
||||
}
|
||||
object_unparent(OBJECT(&shpc->mmio));
|
||||
g_free(shpc->config);
|
||||
g_free(shpc->cmask);
|
||||
g_free(shpc->wmask);
|
||||
|
||||
Reference in New Issue
Block a user