On 10/23/11 15:46, Holger Freyther wrote:
> Holger Freyther <holger@...> writes:
> 
> 

Oh, sorry, I should have read that before committing the fix, thanks anyhow!

The code broke when the surface pool was adjusted for singe app only execution.

> From 1a1020088192b2b5a138a26947b8c7bd74395627 Mon Sep 17 00:00:00 2001
> From: Holger Hans Peter Freyther <hol...@moiji-mobile.com>
> Date: Sun, 23 Oct 2011 15:40:22 +0200
> Subject: [PATCH] pool: Give up memory allocated by localAllocateBuffer
> 
> Use D_FREE on LocationAllocationData.addr to release the memory allocated
> by localAllocateBuffer. This is fixing a memory leak seen when using local
> surface pool.
> ---
>  src/core/local_surface_pool.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/src/core/local_surface_pool.c b/src/core/local_surface_pool.c
> index df45317..173145e 100644
> --- a/src/core/local_surface_pool.c
> +++ b/src/core/local_surface_pool.c
> @@ -170,6 +170,8 @@ localDeallocateBuffer( CoreSurfacePool       *pool,
>       D_MAGIC_ASSERT( buffer, CoreSurfaceBuffer );
>       D_MAGIC_ASSERT( alloc, LocalAllocationData );
>  
> +     D_FREE(alloc->addr);
> +
>       D_MAGIC_CLEAR( alloc );
>  
>       return DFB_OK;


-- 
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to