mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
repair memory leak on sent packets
This commit is contained in:
parent
9c87f801a4
commit
572f2df8bb
@ -157,6 +157,8 @@ ipmi_req_remove_entry(unsigned char seq, unsigned char cmd)
|
|||||||
else
|
else
|
||||||
ipmi_req_entries_tail = NULL;
|
ipmi_req_entries_tail = NULL;
|
||||||
}
|
}
|
||||||
|
if (e->msg_data)
|
||||||
|
free(e->msg_data);
|
||||||
free(e);
|
free(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -666,7 +668,6 @@ ipmi_lan_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
|
|||||||
while (try < IPMI_LAN_RETRY) {
|
while (try < IPMI_LAN_RETRY) {
|
||||||
if (ipmi_lan_send_packet(intf, entry->msg_data, entry->msg_len) < 0) {
|
if (ipmi_lan_send_packet(intf, entry->msg_data, entry->msg_len) < 0) {
|
||||||
printf("ipmi_lan_send_cmd failed\n");
|
printf("ipmi_lan_send_cmd failed\n");
|
||||||
free(entry->msg_data);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -683,9 +684,6 @@ ipmi_lan_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
|
|||||||
try++;
|
try++;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(entry->msg_data);
|
|
||||||
entry->msg_len = 0;
|
|
||||||
|
|
||||||
return rsp;
|
return rsp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user