qom: Crash more nicely on object_property_get_link() failure

Pass &error_abort instead of NULL where the returned value is
dereferenced or asserted to be non-null.  Drop a now redundant
assertion.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20200707160613.848843-24-armbru@redhat.com>
This commit is contained in:
Markus Armbruster 2020-07-07 18:05:51 +02:00
parent 90c69fb9fd
commit 552d7f49ee
5 changed files with 10 additions and 7 deletions

View file

@ -1655,7 +1655,8 @@ static void spapr_handle_transient_dev_before_cas(SpaprMachineState *spapr)
continue;
}
drc = SPAPR_DR_CONNECTOR(object_property_get_link(drc_container,
prop->name, NULL));
prop->name,
&error_abort));
if (spapr_drc_transient(drc)) {
spapr_drc_reset(drc);