aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2009-07-11 11:11:10 +0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-07-28 13:45:22 -0700
commit3b4418c67a70278964b063b5e1f56dcb3d0a41f3 (patch)
tree4112e10d4d523a55bc95fdfc46306881f7569820 /drivers/base
parent0f58b44582001c8bcdb75f36cf85ebbe5170e959 (diff)
downloadkernel_samsung_smdk4412-3b4418c67a70278964b063b5e1f56dcb3d0a41f3.zip
kernel_samsung_smdk4412-3b4418c67a70278964b063b5e1f56dcb3d0a41f3.tar.gz
kernel_samsung_smdk4412-3b4418c67a70278964b063b5e1f56dcb3d0a41f3.tar.bz2
driver core: firmware_class:fix memory leak of page pointers array
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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/firmware_class.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index f285f44..7376367 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);