Holger Freyther <holger@...> writes:

>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;
-- 
1.7.5.4






_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to