Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1543762 > unrolled thread
| Started by | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| First post | 2016-12-16 22:40 +0100 |
| Last post | 2016-12-16 22:40 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] [media] bt8xx: fix memory leak Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-12-16 22:40 +0100
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2016-12-16 22:40 +0100 |
| Subject | [PATCH] [media] bt8xx: fix memory leak |
| Message-ID | <sP8oq-zl-15@gated-at.bofh.it> |
If dvb_attach() fails then we were just printing an error message and
exiting but the memory allocated to state was not released.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---
drivers/media/pci/bt8xx/dvb-bt8xx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/pci/bt8xx/dvb-bt8xx.c b/drivers/media/pci/bt8xx/dvb-bt8xx.c
index 6100fa7..e247638 100644
--- a/drivers/media/pci/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/pci/bt8xx/dvb-bt8xx.c
@@ -683,6 +683,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
/* DST is not a frontend, attaching the ASIC */
if (dvb_attach(dst_attach, state, &card->dvb_adapter) == NULL) {
pr_err("%s: Could not find a Twinhan DST\n", __func__);
+ kfree(state);
break;
}
/* Attach other DST peripherals if any */
--
1.9.1
Back to top | Article view | linux.kernel
csiph-web