Blob Blame History Raw
From b38fc30dc4433050508802a9523fcf4f9487e03b Mon Sep 17 00:00:00 2001
From: Boris Ranto <branto@redhat.com>
Date: Fri, 6 Nov 2015 12:56:17 +0100
Subject: [PATCH 06/11] ipmitool-1.8.11-sol-leak.patch

576004 - ipmitool lanplus SOL leaks memory on every SOL ack
731977 - memory leak: 25,830 bytes in 315 blocks are definitely lost

Following command leaks memory with some SOL packets (simply generate
some activity on the console):

ipmitool -I lanplus -H somehost -U root -P somepasswd sol activate

The patch below plugs the leak.

Sent upstream as
https://sourceforge.net/mailarchive/message.php?msg_name=20100329142345.19857.22196.stgit%40dhcp-30-141.brq.redhat.com

Backported by: jsafrane
---
 src/plugins/lanplus/lanplus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/plugins/lanplus/lanplus.c b/src/plugins/lanplus/lanplus.c
index 0bff5b2..998c1f9 100644
--- a/src/plugins/lanplus/lanplus.c
+++ b/src/plugins/lanplus/lanplus.c
@@ -2348,6 +2348,7 @@ ipmi_lanplus_send_payload(
 	case IPMI_PAYLOAD_TYPE_RMCP_OPEN_REQUEST:
 	case IPMI_PAYLOAD_TYPE_RAKP_1:
 	case IPMI_PAYLOAD_TYPE_RAKP_3:
+	case IPMI_PAYLOAD_TYPE_SOL:
 		free(msg_data);
 		msg_data = NULL;
 		break;
-- 
2.1.0