[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1493176303-9491-1-git-send-email-os@iscas.ac.cn>
Date: Tue, 25 Apr 2017 20:11:43 -0700
From: Heloise <os@...as.ac.cn>
To: sathya.prakash@...adcom.com, chaitra.basappa@...adcom.com,
suganath-prabu.subramani@...adcom.com, jejb@...ux.vnet.ibm.com,
martin.petersen@...cle.com
Cc: MPT-FusionLinux.pdl@...adcom.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org, Heloise <os@...as.ac.cn>
Subject: [PATCH] mpt3sas_base:fix memory leak in _base_request_irq
Signed-off-by: Heloise <os@...as.ac.cn>
In function _base_request_irq, variable reply_q applies for memory
space 'reply_q=kzalloc()', but does not release it before the function
returns, fix it.
---
drivers/scsi/mpt3sas/mpt3sas_base.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 5b7aec5..801dfab 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -1884,6 +1884,7 @@ _base_request_irq(struct MPT3SAS_ADAPTER *ioc, u8 index)
INIT_LIST_HEAD(&reply_q->list);
list_add_tail(&reply_q->list, &ioc->reply_queue_list);
+ kfree(reply_q);
return 0;
}
--
2.1.0
Powered by blists - more mailing lists