Hi,

> -----Original Message-----
> From: [email protected] [mailto:linux-omap-
> [email protected]] On Behalf Of Ramirez Luna, Omar
> Sent: Monday, January 19, 2009 11:00 AM
> To: Pandita, Vikram; Hiroshi DOYU
> Cc: [email protected]; Kanigeri, Hari; Gupta, Ramesh
> Subject: [PATCH] DSPBRIDGE Memory leak when dynbase is loaded
> 
> From: Omar Ramirez <x0084...@mmlinux.(none)>
> Date: Wed, 14 Jan 2009 15:47:54 -0600
> Subject: [PATCH] DSPBRIDGE Memory leak when dynbase is loaded
> 
> This patch fixes a memory leak that happens whenever
> a dynamic base image is loaded and then the driver is
> uninstalled.
> 
> Signed-off-by: Omar Ramirez Luna <[email protected]>
> ---
>  drivers/dsp/bridge/dynload/cload.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/dsp/bridge/dynload/cload.c
> b/drivers/dsp/bridge/dynload/cload.c
> index 271ab81..a6d7ae6 100644
> --- a/drivers/dsp/bridge/dynload/cload.c
> +++ b/drivers/dsp/bridge/dynload/cload.c
> @@ -1806,6 +1806,8 @@ loop_end:
>               if (syms->Find_Matching_Symbol
>                       (syms, LOADER_DLLVIEW_ROOT) == NULL)
>                       syms->Deallocate(syms, root);
> +             if (root != NULL)
> +                     syms->Deallocate(syms, root);

I would suggest a simpler check like this:

                if (!syms->Find_Matching_Symbol(syms, LOADER_DLLVIEW_ROOT) ||
                                                                        root)
                        syms->Deallocate(syms, root);

Regards,
Sergio

>       }
>  #endif
>  func_end:
> --
> 1.5.4.3
> --
> 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