lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 19 Apr 2010 09:58:02 +0800 From: Axel Lin <axel.lin@...il.com> To: linux-kernel <linux-kernel@...r.kernel.org> Cc: Sascha Hauer <s.hauer@...gutronix.de>, Liam Girdwood <lrg@...mlogic.co.uk>, Mark Brown <broonie@...nsource.wolfsonmicro.com>, Samuel Ortiz <sameo@...ux.intel.com> Subject: [PATCH] mc13783-regulator: fix a memory leak in mc13783_regulator_remove This patch fixes a memory leak by freeing priv in mc13783_regulator_remove Signed-off-by: Axel Lin <axel.lin@...il.com> Cc: Sascha Hauer <s.hauer@...gutronix.de> Cc: Liam Girdwood <lrg@...mlogic.co.uk> Cc: Mark Brown <broonie@...nsource.wolfsonmicro.com> Cc: Samuel Ortiz <sameo@...ux.intel.com> --- drivers/regulator/mc13783-regulator.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c index a681f5e..ad036dd 100644 --- a/drivers/regulator/mc13783-regulator.c +++ b/drivers/regulator/mc13783-regulator.c @@ -618,9 +618,12 @@ static int __devexit mc13783_regulator_remove(struct platform_device *pdev) dev_get_platdata(&pdev->dev); int i; + platform_set_drvdata(pdev, NULL); + for (i = 0; i < pdata->num_regulators; i++) regulator_unregister(priv->regulators[i]); + kfree(priv); return 0; } -- 1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists