Skip to content
Snippets Groups Projects
Commit f6166a4d authored by Markus Armbruster's avatar Markus Armbruster
Browse files

hw/ipmi: Fix realize() error API violations


isa_ipmi_bt_realize(), ipmi_isa_realize(), pci_ipmi_bt_realize(), and
pci_ipmi_kcs_realize() dereference @errp when IPMIInterfaceClass
method init() fails.  That's wrong; see the big comment in error.h.
Introduced in commit 0719029c "ipmi: Add an ISA KCS low-level
interface", then imitated in commit a9b74079 "ipmi: Add a BT
low-level interface" and commit 12f983c6 "ipmi: Add PCI IPMI
interfaces".

No caller actually passes null.

Fix anyway: splice in a local Error *err, and error_propagate().

Cc: Corey Minyard <cminyard@mvista.com>
Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Message-Id: <20191204093625.14836-9-armbru@redhat.com>
parent bc0e339b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment