All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: mach-omap2: voltage: debugfs: fix memory leak
@ 2011-01-28 16:24 ` Aaro Koskinen
  0 siblings, 0 replies; 4+ messages in thread
From: Aaro Koskinen @ 2011-01-28 16:24 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap; +Cc: Aaro Koskinen

The temporary string holding the directory name to be created should
be released.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---
 arch/arm/mach-omap2/voltage.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index ed6079c..12be525 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -471,6 +471,7 @@ static void __init vdd_debugfs_init(struct omap_vdd_info *vdd)
 	strcat(name, vdd->voltdm.name);
 
 	vdd->debug_dir = debugfs_create_dir(name, voltage_dir);
+	kfree(name);
 	if (IS_ERR(vdd->debug_dir)) {
 		pr_warning("%s: Unable to create debugfs directory for"
 			" vdd_%s\n", __func__, vdd->voltdm.name);
-- 
1.5.6.5


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

* [PATCH] arm: mach-omap2: voltage: debugfs: fix memory leak
@ 2011-01-28 16:24 ` Aaro Koskinen
  0 siblings, 0 replies; 4+ messages in thread
From: Aaro Koskinen @ 2011-01-28 16:24 UTC (permalink / raw)
  To: linux-arm-kernel

The temporary string holding the directory name to be created should
be released.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---
 arch/arm/mach-omap2/voltage.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index ed6079c..12be525 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -471,6 +471,7 @@ static void __init vdd_debugfs_init(struct omap_vdd_info *vdd)
 	strcat(name, vdd->voltdm.name);
 
 	vdd->debug_dir = debugfs_create_dir(name, voltage_dir);
+	kfree(name);
 	if (IS_ERR(vdd->debug_dir)) {
 		pr_warning("%s: Unable to create debugfs directory for"
 			" vdd_%s\n", __func__, vdd->voltdm.name);
-- 
1.5.6.5

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

* Re: [PATCH] arm: mach-omap2: voltage: debugfs: fix memory leak
  2011-01-28 16:24 ` Aaro Koskinen
@ 2011-01-28 22:15   ` Kevin Hilman
  -1 siblings, 0 replies; 4+ messages in thread
From: Kevin Hilman @ 2011-01-28 22:15 UTC (permalink / raw)
  To: Aaro Koskinen; +Cc: linux-arm-kernel, linux-omap

Aaro Koskinen <aaro.koskinen@nokia.com> writes:

> The temporary string holding the directory name to be created should
> be released.
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>

Thanks, queuing in pm-fixes  for 2.6.38.

Kevin

> ---
>  arch/arm/mach-omap2/voltage.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
> index ed6079c..12be525 100644
> --- a/arch/arm/mach-omap2/voltage.c
> +++ b/arch/arm/mach-omap2/voltage.c
> @@ -471,6 +471,7 @@ static void __init vdd_debugfs_init(struct omap_vdd_info *vdd)
>  	strcat(name, vdd->voltdm.name);
>  
>  	vdd->debug_dir = debugfs_create_dir(name, voltage_dir);
> +	kfree(name);
>  	if (IS_ERR(vdd->debug_dir)) {
>  		pr_warning("%s: Unable to create debugfs directory for"
>  			" vdd_%s\n", __func__, vdd->voltdm.name);

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

* [PATCH] arm: mach-omap2: voltage: debugfs: fix memory leak
@ 2011-01-28 22:15   ` Kevin Hilman
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Hilman @ 2011-01-28 22:15 UTC (permalink / raw)
  To: linux-arm-kernel

Aaro Koskinen <aaro.koskinen@nokia.com> writes:

> The temporary string holding the directory name to be created should
> be released.
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>

Thanks, queuing in pm-fixes  for 2.6.38.

Kevin

> ---
>  arch/arm/mach-omap2/voltage.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
> index ed6079c..12be525 100644
> --- a/arch/arm/mach-omap2/voltage.c
> +++ b/arch/arm/mach-omap2/voltage.c
> @@ -471,6 +471,7 @@ static void __init vdd_debugfs_init(struct omap_vdd_info *vdd)
>  	strcat(name, vdd->voltdm.name);
>  
>  	vdd->debug_dir = debugfs_create_dir(name, voltage_dir);
> +	kfree(name);
>  	if (IS_ERR(vdd->debug_dir)) {
>  		pr_warning("%s: Unable to create debugfs directory for"
>  			" vdd_%s\n", __func__, vdd->voltdm.name);

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

end of thread, other threads:[~2011-01-28 22:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28 16:24 [PATCH] arm: mach-omap2: voltage: debugfs: fix memory leak Aaro Koskinen
2011-01-28 16:24 ` Aaro Koskinen
2011-01-28 22:15 ` Kevin Hilman
2011-01-28 22:15   ` Kevin Hilman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.