lkml.org 
[lkml]   [2014]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] staging: slicoss: fix dma memory leak
Date
Fix memory leak in slic_card_init. If the driver fails to poll for an
interrupt after requesting config data from the device the dma memory
is never freed.

Signed-off-by: David Matlack <matlackdavid@gmail.com>
---
This patch was originally sent here https://lkml.org/lkml/2014/5/6/7 with
my google.com email address. But due to Google's recent change in DMARC
policies, that patchset was silently dropped for at least some users
(including my personal gmail account). So I'm sending it out now with
my gmail.com account. Let me know if this is an issue. Thanks.

drivers/staging/slicoss/slicoss.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index e27b88f..5b82455 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -3293,6 +3293,9 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
&slic_regs->slic_isp, 0,
&slic_regs->slic_addr_upper,
0, FLUSH);
+ pci_free_consistent(adapter->pcidev,
+ sizeof(struct slic_eeprom),
+ peeprom, phys_config);
return -EINVAL;
}
}
--
1.9.2


\
 
 \ /
  Last update: 2014-05-23 07:41    [W:2.117 / U:1.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site