mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
ID: 284 - Fix SEGV in ipmi_main
Check the return code of ipmi_main_intf->open(), and take the error path if it fails. Right now we continue on blindly which results in a SEGV. Commit for Anton Blanchard
This commit is contained in:
parent
0b97d32c25
commit
5dc9585e77
@ -894,9 +894,11 @@ ipmi_main(int argc, char ** argv,
|
||||
|
||||
/* Open the interface with the specified or default IPMB address */
|
||||
ipmi_main_intf->my_addr = arg_addr ? arg_addr : IPMI_BMC_SLAVE_ADDR;
|
||||
if (ipmi_main_intf->open != NULL)
|
||||
ipmi_main_intf->open(ipmi_main_intf);
|
||||
|
||||
if (ipmi_main_intf->open != NULL) {
|
||||
if (ipmi_main_intf->open(ipmi_main_intf) < 0) {
|
||||
goto out_free;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Attempt picmg discovery of the actual interface address unless
|
||||
* the users specified an address.
|
||||
|
Loading…
x
Reference in New Issue
Block a user