RE: [PATCH v2] OMAP: Fix Memory leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Manjunath,

> -----Original Message-----
> From: linux-omap-owner@xxxxxxxxxxxxxxx [mailto:linux-omap-
> owner@xxxxxxxxxxxxxxx] On Behalf Of G, Manjunath Kondaiah
> Sent: Friday, May 21, 2010 1:15 AM
> To: linux-omap@xxxxxxxxxxxxxxx
> Cc: Kumar, Satish; Tony Lindgren; vimal singh
> Subject: [PATCH v2] OMAP: Fix Memory leak

The subject prefix doesn't help much to know which OMAP code you're
referring to. Maybe a more proper renaming could be:

omap: iovmm: Fix memory leak

Just do 'git log -p arch/arm/plat-omap/iovmm.c' to see the convention taken so far.

> 
> From: Satish <x0124230@xxxxxx>
> 
> The memory allocated for sgt structure is not freed on error
> when sg_alloc_table is called in sgtable_alloc().
> 
> Signed-off-by: Satish Kumar <x0124230@xxxxxx>
> Signed-off-by: Manjunatha GK <manjugk@xxxxxx>
> Cc: Tony Lindgren <tony@xxxxxxxxxxx>
> Cc: vimal singh <vimal.newwork@xxxxxxxxx>

You're missing here the main code maintainer:

Cc: Hiroshi DOYU <Hiroshi.DOYU@xxxxxxxxx>

I'm looping him in this time.

Regards,
Sergio

> ---
>  arch/arm/plat-omap/iovmm.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
> index e43983b..8ce0de2 100644
> --- a/arch/arm/plat-omap/iovmm.c
> +++ b/arch/arm/plat-omap/iovmm.c
> @@ -140,8 +140,10 @@ static struct sg_table *sgtable_alloc(const size_t
> bytes, u32 flags)
>  		return ERR_PTR(-ENOMEM);
> 
>  	err = sg_alloc_table(sgt, nr_entries, GFP_KERNEL);
> -	if (err)
> +	if (err) {
> +		kfree(sgt);
>  		return ERR_PTR(err);
> +	}
> 
>  	pr_debug("%s: sgt:%p(%d entries)\n", __func__, sgt, nr_entries);
> 
> --
> 1.7.0.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux