Following command segfaults, if there is no /dev/ipmi device: $ ipmitool sol payload status Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory Segmentation fault
This patch fixes the obvious NULL-pointer reference. I know, it's me who wrote this code :) Signed-off-by: Jan Safranek <jsafr...@redhat.com> --- lib/ipmi_sol.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/lib/ipmi_sol.c b/lib/ipmi_sol.c index c2689a6..9f49865 100644 --- a/lib/ipmi_sol.c +++ b/lib/ipmi_sol.c @@ -163,8 +163,7 @@ ipmi_sol_payload_access_status(struct ipmi_intf * intf, rsp = intf->sendrecv(intf, &req); if (rsp == NULL) { - lprintf(LOG_ERR, "Error: Unexpected data length (%d) received", - rsp->data_len); + lprintf(LOG_ERR, "Error sending SOL payload status request"); return -1; } ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Ipmitool-devel mailing list Ipmitool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipmitool-devel