ID: 285 - Fix SEGV in ipmi_lanplus_open_session

If ipmi_lanplus_send_payload fails we get a NULL pointer
returned. Error out straight away instead of continuing on
and getting a SEGV when we dereference rsp.

Commit for Anton Blanchard
This commit is contained in:
Zdenek Styblik 2013-12-08 19:06:13 +00:00
parent 5dc9585e77
commit 36c11f6033

View File

@ -2858,7 +2858,10 @@ ipmi_lanplus_open_session(struct ipmi_intf * intf)
free(msg); free(msg);
msg = NULL; msg = NULL;
if (!rsp) {
lprintf(LOG_WARNING, "Error sending open session message.");
return -1;
}
if (verbose) if (verbose)
lanplus_dump_open_session_response(rsp); lanplus_dump_open_session_response(rsp);