From: Heloise <os@iscas.ac.cn>
To: sathya.prakash@broadcom.com, chaitra.basappa@broadcom.com,
suganath-prabu.subramani@broadcom.com, jejb@linux.vnet.ibm.com,
martin.petersen@oracle.com
Cc: MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, Heloise <os@iscas.ac.cn>
Subject: [PATCH] mpt3sas_base:fix memory leak in _base_request_irq
Date: Tue, 25 Apr 2017 20:11:43 -0700 [thread overview]
Message-ID: <1493176303-9491-1-git-send-email-os@iscas.ac.cn> (raw)
Signed-off-by: Heloise <os@iscas.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
reply other threads:[~2017-04-26 3:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1493176303-9491-1-git-send-email-os@iscas.ac.cn \
--to=os@iscas.ac.cn \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=chaitra.basappa@broadcom.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sathya.prakash@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®