mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
ID: 3528310 - 'lib/ipmi_picmg.c' - NULL reference
Commit fixes reference to rsp which can be NULL if there is no response from BMC, eg. KCS driver is not loaded.
This commit is contained in:
parent
d2d2f4789d
commit
daf4c4831f
@ -150,9 +150,13 @@ ipmi_picmg_getaddr(struct ipmi_intf * intf, int argc, char ** argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
rsp = intf->sendrecv(intf, &req);
|
rsp = intf->sendrecv(intf, &req);
|
||||||
if (!rsp || rsp->ccode) {
|
if (!rsp) {
|
||||||
printf("Error getting address information CC: 0x%02x\n", rsp->ccode);
|
lprintf(LOG_ERR, "No valid response received.");
|
||||||
return -1;
|
return (-1);
|
||||||
|
} else if (rsp->ccode) {
|
||||||
|
lprintf(LOG_ERR, "Error getting address information CC: 0x%02x",
|
||||||
|
rsp->ccode);
|
||||||
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Hardware Address : 0x%02x\n", rsp->data[1]);
|
printf("Hardware Address : 0x%02x\n", rsp->data[1]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user