public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] driver core:firmware_class:fix memory leak of page pointers array
@ 2009-07-09  0:16 tom.leiming
  2009-07-09  0:20 ` Ming Lei
  0 siblings, 1 reply; 6+ messages in thread
From: tom.leiming @ 2009-07-09  0:16 UTC (permalink / raw)
  To: greg; +Cc: linux-kernel, catalin.marinas, dwmw2, kay.sievers, Ming Lei

From: Ming Lei <tom.leiming@gmail.com>

The page pointers array is allocated in fw_realloc_buffer() called by
firmware_data_write(), and should be freed in release function of firmware
device.

Signed-off-by:Ming Lei <tom.leiming@gmail.com>
Reported-by:Catalin Marinas <catalin.marinas@arm.com>
Acked-by: David Woodhouse <David.Woodhouse@intel.com>
---
 drivers/base/firmware_class.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index fc46653..2643366 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -180,7 +180,6 @@ static ssize_t firmware_loading_store(struct device *dev,
 				goto err;
 			}
 			/* Pages will be freed by vfree() */
-			fw_priv->pages = NULL;
 			fw_priv->page_array_size = 0;
 			fw_priv->nr_pages = 0;
 			complete(&fw_priv->completion);
-- 
1.6.0.GIT


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-07-16 22:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-09  0:16 [PATCH] driver core:firmware_class:fix memory leak of page pointers array tom.leiming
2009-07-09  0:20 ` Ming Lei
2009-07-10 17:36   ` Greg KH
2009-07-11  3:11     ` Ming Lei
2009-07-16 13:22       ` Ming Lei
2009-07-16 22:41         ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox