Hi Manjunath,

> -----Original Message-----
> From: [email protected] [mailto:linux-omap-
> [email protected]] On Behalf Of G, Manjunath Kondaiah
> Sent: Friday, May 21, 2010 1:15 AM
> To: [email protected]
> 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 <[email protected]>
> 
> 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 <[email protected]>
> Signed-off-by: Manjunatha GK <[email protected]>
> Cc: Tony Lindgren <[email protected]>
> Cc: vimal singh <[email protected]>

You're missing here the main code maintainer:

Cc: Hiroshi DOYU <[email protected]>

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 [email protected]
> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to