mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:17 +00:00
hw/ipmi: reject NULL 'bmc' property rather than crash
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
@@ -97,8 +97,14 @@ static void isa_ipmi_bmc_check(const Object *obj, const char *name,
|
||||
{
|
||||
IPMIBmc *bmc = IPMI_BMC(val);
|
||||
|
||||
if (bmc->intf)
|
||||
if (!bmc) {
|
||||
error_setg(errp, "%s cannot be set to NULL", name);
|
||||
return;
|
||||
}
|
||||
|
||||
if (bmc->intf) {
|
||||
error_setg(errp, "BMC object is already in use");
|
||||
}
|
||||
}
|
||||
|
||||
void ipmi_bmc_find_and_link(Object *obj, Object **bmc)
|
||||
|
||||
Reference in New Issue
Block a user