Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1631129
| From | Heloise <os@iscas.ac.cn> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] mpt3sas_base:fix memory leak in _base_request_irq |
| Date | 2017-04-26 05:30 +0200 |
| Message-ID | <tAlOp-57P-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] mpt3sas_base:fix memory leak in _base_request_irq Heloise <os@iscas.ac.cn> - 2017-04-26 05:30 +0200
csiph-web