aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_msghandler.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/ipmi/ipmi_msghandler.c')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 34a4fd13fa81..e55a0d276729 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -376,13 +376,23 @@ static void free_recv_msg_list(struct list_head *q)
376 } 376 }
377} 377}
378 378
379static void free_smi_msg_list(struct list_head *q)
380{
381 struct ipmi_smi_msg *msg, *msg2;
382
383 list_for_each_entry_safe(msg, msg2, q, link) {
384 list_del(&msg->link);
385 ipmi_free_smi_msg(msg);
386 }
387}
388
379static void clean_up_interface_data(ipmi_smi_t intf) 389static void clean_up_interface_data(ipmi_smi_t intf)
380{ 390{
381 int i; 391 int i;
382 struct cmd_rcvr *rcvr, *rcvr2; 392 struct cmd_rcvr *rcvr, *rcvr2;
383 struct list_head list; 393 struct list_head list;
384 394
385 free_recv_msg_list(&intf->waiting_msgs); 395 free_smi_msg_list(&intf->waiting_msgs);
386 free_recv_msg_list(&intf->waiting_events); 396 free_recv_msg_list(&intf->waiting_events);
387 397
388 /* Wholesale remove all the entries from the list in the 398 /* Wholesale remove all the entries from the list in the