Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1412474 > unrolled thread

[PATCH] [media] c8sectpfe: fix memory leak

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2016-06-02 20:10 +0200
Last post2016-06-02 20:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] [media] c8sectpfe: fix memory leak Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-06-02 20:10 +0200

#1412474 — [PATCH] [media] c8sectpfe: fix memory leak

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2016-06-02 20:10 +0200
Subject[PATCH] [media] c8sectpfe: fix memory leak
Message-ID<rFFe9-103-15@gated-at.bofh.it>
We have assigned memory while requesting the firmware but if the sanity
check fails then we are not releasing the firmware.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---
 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 7dddf77..30c148b 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -1161,6 +1161,7 @@ static int load_c8sectpfe_fw(struct c8sectpfei *fei)
 	if (err) {
 		dev_err(fei->dev, "c8sectpfe_elf_sanity_check failed err=(%d)\n"
 			, err);
+		release_firmware(fw);
 		return err;
 	}
 
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web