diff options
author | Bhavesh Parekh <bparekh@nvidia.com> | 2011-12-14 12:09:14 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 01:32:04 -0700 |
commit | 5252a8d8f44047d6ee211678432647a9c24300a1 (patch) | |
tree | 05320dbda68d0d50fc9739fe8a253c2206006248 /drivers/mtd | |
parent | 347b0518ce78f526fe71079340499161d8f8802b (diff) |
tegra: nand: fix memory leak in cleanup code
Bug 913416
Change-Id: I19f45bcd2c1ef9cb625728294b1dd53695e7d64b
Signed-off-by: Bhavesh Parekh <bparekh@nvidia.com>
Reviewed-on: http://git-master/r/69938
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: David Schalig <dschalig@nvidia.com>
Tested-by: David Schalig <dschalig@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Rebase-Id: Re7e3bfae2c225cb5df3479261a5be4cbfd851501
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/devices/tegra_nand.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mtd/devices/tegra_nand.c b/drivers/mtd/devices/tegra_nand.c index 4b01d740ad5b..a580fd3419d2 100644 --- a/drivers/mtd/devices/tegra_nand.c +++ b/drivers/mtd/devices/tegra_nand.c @@ -1666,7 +1666,7 @@ static int tegra_nand_probe(struct platform_device *pdev) err = device_create_file(&pdev->dev, &dev_attr_device_id); if (err != 0) - goto out_free_bbbmap; + goto out_free_rw_buffer; err = device_create_file(&pdev->dev, &dev_attr_vendor_id); if (err != 0) @@ -1699,6 +1699,9 @@ err_nand_sysfs_flash_size_failed: err_nand_sysfs_vendorid_failed: device_remove_file(&pdev->dev, &dev_attr_device_id); +out_free_rw_buffer: + kfree(info->partial_unaligned_rw_buffer); + out_free_bbbmap: kfree(info->bb_bitmap); |